I have a CLOB field in my Oracle (v12.2) table which looks like this:
CREATE TABLE dmo_person (
per_id RAW(16) CONSTRAINT NN_per_id NOT NULL,
per_name VARCHAR2(128),
per_tags CLOB CONSTRAINT dmo_pers_json_0 CHECK (per_tags IS JSON),
CONSTRAINT sko_person_pk_0 PRIMARY KEY (per_id)
);
The JSON data has the following structure:
insert into dmo_person
( per_id, per_name, per_tags )
values
(
sys_guid(),
'John Doe',
'{ "perm_admin" : 1, "perm_fileuser" : 0, "perm_subcon" : 1} ',
);
So my question: Using an SQL update statement, how can I add another value like "perm_bigboss" : 1 to my CLOB? And is there an easy way to set a single value "perm_admin" : 0 using SQL?