clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 807060 fiddles created (10902 in the last week).

select * from V$VERSION;
BANNER BANNER_FULL BANNER_LEGACY CON_ID
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Version 18.4.0.0.0 Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production 0
 hidden batch(es)


create table myjson (data nclob check (data is json));
 hidden batch(es)


insert into myjson values ('{"a": {"b": {"c": 1}}}');
1 rows affected
 hidden batch(es)


insert into myjson values ('{"content": "something"}');
1 rows affected
 hidden batch(es)


select * from myjson where json_query(myjson.data, '$.a') = '{"b": {"c": 1}}';
DATA
 hidden batch(es)


select * from myjson where json_query(myjson.data, '$.a') = json_query('{"b": {"c": 1}}', '$');
DATA
{"a": {"b": {"c": 1}}}
 hidden batch(es)


select * from myjson where json_query(myjson.data, '$.a') = dbms_lob.substr('{"b": {"c": 1}}');
DATA
 hidden batch(es)


select * from myjson where json_query(myjson.data, '$.a') = json_query('{"val": {"b": {"c": 1}}}', '$.val');
DATA
{"a": {"b": {"c": 1}}}
 hidden batch(es)


select * from myjson where json_value(myjson.data, '$.content') = 'something';
DATA
{"content": "something"}
 hidden batch(es)


select * from myjson where json_value(myjson.data, '$.content') = json_value('"something"', '$');
DATA
 hidden batch(es)


select * from myjson where json_value(myjson.data, '$.content') = json_value('{"val": "something"}', '$.val');
DATA
{"content": "something"}
 hidden batch(es)