Skip to content

add support for FOR ORDINALITY in JSON_TABLE #1492

Closed
@lovasoa

Description

@lovasoa

Initially reported in sqlpage/SQLPage#658

This is a follow-up on #1019

I already implemented most of json_table, but we are still missing support for FOR ORDINALITY columns.

Reference: https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html#function_json-table

Exemple:

SELECT jt.*
FROM JSON_TABLE(
  '["Alice", "Bob", "Charlie"]',
  '$[*]' COLUMNS(
    row_num FOR ORDINALITY,
    name VARCHAR(50) PATH '$'
  )
) AS jt;

try online

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions