Hi,
I'm trying to generate json data using json_object_t datatype and inserting into it. I have created a samle scenario here and it is giving me the error
Database version is 12cR2.
Error report -
ORA-40573: Invalid use of PL/SQL JSON object type.
ORA-06512: at line 5
create table s1 ( s varchar2(32767));
alter table "ADPDBT"."S1" add constraint SCK check(S IS JSON) ENABLE;
inserting data into the table
DECLARE
r_js json_object_t;
BEGIN
r_js := JSON_OBJECT_T('{ "employee_no":9999 }');
insert into s1 values (r_js.to_string);
commit;
END;
/
Regards,
hsemar