Team,
The below example was from 19c database.
inserted the above JSON into a table.
when i get "CSEQ" column in output, "DSEQ" columns output seems to be correct.
but when i dont get "CSEQ" column in output, "DSEQ" columns output seems to be incorrect.
Kinldy help us to undersand if this is a correct behaviour?
demo@PDB1> select jt.*
2 from t, json_table( x, '$'
3 columns(
4 xa number path '$.a',
5 xb number path '$.b',
6 csize number path '$.c.size()',
7 nested path '$.c[*]'
8 columns(
9 dsize number path '$.d.size()' ,
10 cseq for ordinality ,
11 nested path '$.d[*]'
12 columns(
13 dx varchar2(10) path '$.x',dseq for ordinality)
14 )
15 )) jt
16 /
XA XB CSIZE DSIZE CSEQ DX DSEQ
---------- ---------- ---------- ---------- ---------- ---------- ----------
100 200 2 1 1 yes 1
100 200 2 2 2 no 1
100 200 2 2 2 yes 2
demo@PDB1> select jt.*
2 from t, json_table( x, '$'
3 columns(
4 xa number path '$.a',
5 xb number path '$.b',
6 csize number path '$.c.size()',
7 nested path '$.c[*]'
8 columns(
9 dsize number path '$.d.size()' ,
10 --cseq for ordinality ,
11 nested path '$.d[*]'
12 columns(
13 dx varchar2(10) path '$.x',dseq for ordinality)
14 )
15 )) jt
16 /
XA XB CSIZE DSIZE DX DSEQ
---------- ---------- ---------- ---------- ---------- ----------
100 200 2 1 yes 1
100 200 2 2 no 2
100 200 2 2 yes 3
demo@PDB1> select banner_full from v$version;
BANNER_FULL
-----------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
demo@PDB1>