I have an SQL like this:
INSERT INTO table1
()
SELECT
FROM dual
WHERE NOT EXISTS (
SELECT 1
FROM
WHERE );
Thing is, I want to get the primary key of the inserted row in table1 .
Looks like a the RETURNING clause cannot be used for INSERT INTO SELECT.
I tried and it gives error.
My DB is 11g Enterprise Edition Release 11.2.0.4.0 .