Hi ,
I am creating a SQL table with JSON data in it. I wote the following SQL script-:
CREATE TABLE json_documents (
id NUMBER,
data CLOB,
CONSTRAINT json_documents_pk PRIMARY KEY (id),
CONSTRAINT json_documents_json_chk CHECK (data IS JSON)
);
INSERT INTO json_documents (id, data)
VALUES (1, '{
“userId”:generic-employee@abc.com,
“priviliges”:[
{
“name”:"A",
“code”:"1",
},
{
“name”:"B",
“code”:"2",
},
{
“name”:"C",
“code”:"3",
},
{
“name”:"D",
“code”:"4",
},
{
“name”:"E",
“code”:"5",
},
{
“name”:"F",
“code”:”6”,
}
]
}');
COMMIT;
The issue is the table gets created but no data is inserted into it. When i run the select command it returns "No rows were selected". Please help.