drop table jtc purge
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table jtc (
rn number not null primary key
, js clob not null
, constraint jtc_json_ck check (js is json)
)
Table created.
insert into jtc (rn, js)
values (1,'{
"address_name": "Empire State Building",
"address": "20 W 29th St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country_code": "USA"
}')
1 row(s) inserted.
commit
Statement processed.
create search index jtc_dx on jtc (js) for json
parameters ('
search_on text_value
memory 100M
sync (on commit)
')
Index created.
select *
from jtc
where 1=1
and ( json_textcontains(js,'$.state','ny%') )
and ( json_textcontains(js,'$.address','em%') or json_textcontains(js,'$.address_name','em%') )
RN | JS | 1 | { "address_name": "Empire State Building", "address": "20 W 29th St", "city": "New York", "state": "NY", "postal_code": "10001", "country_code": "USA" } |
---|
select *
from jtc
where 1=1
and ( json_textcontains(js,'$.address','em%') or json_textcontains(js,'$.address_name','em%') )
and ( json_textcontains(js,'$.state','ny%') )
no data found