select a.b.c.d.e from t a

I just learnt a new syntax. With 12.1.0.2, you can dive into your JSON document within sql, it looks a bit unusual to me

SQL> CREATE TABLE t
(b CLOB CHECK (b IS JSON));
Table created.

SQL> insert into t(b) values
('{"c":{"d":{"e":1}}}');
1 row created.

SQL> select a.b.c.d.e from t a;
C
----------------------
1

Largely inspired from Tom Kyte session

Published
Categorized as 12c Tagged

By Laurent Schneider

Oracle Certified Master

1 comment

Leave a comment

Your email address will not be published.