12 g
Hi Gurus,
I am passing a Clob parameter to a procedure that has JSON data in the following format
{
"items": [
{
"Col_b": "some data here",
"Col_c": "some data here"
}
]
}
Table structure
Create table Test_Insert
(
Col_a Number GENERATED BY DEFAULT ON NULL AS IDENTITY,
Col_b varchar2(200),
Col_c varchar2(200)
);
I am extracting the data from this Json input with the following query
Insert into test_insert (Col_b,Col_c) select * from json_table(p_data , '$.items[*]'
COLUMNS (
COL_B VARCHAR2 PATH '$.Col_b',
COL_C VARCHAR2 PATH '$.Col_c'
)) RETURNING COL_A into somevariable
Is there a way to get the COL_A with the latest identity value populated in anyway? My this JSON input is coming from a VB application and is always going to be a single record only. The insert with select is only used to parse the JSON input.
I want to get the identity column of the latest insert some way.
Thanks
Sunil