Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question about INSERT with RETURNING INTO statement

539442Mar 15 2007 — edited Mar 15 2007
I've been using the INSERT INTO table (..) VALUES (...) RETURNING id INTO var in several queries/procedures with success.
Now I have an INSERT query based on a SELECT, but when I add the RETURNING INTO statement it's causing an error when I try to compile the proc:

INSERT INTO table (a,b,c)
SELECT a,b,c FROM table2 WHERE x = y
RETURNING table.id
INTO var

Line # = 63 Column # = 3 Error Text = PL/SQL: SQL Statement ignored
Line # = 99 Column # = 3 Error Text = PL/SQL: ORA-00933: SQL command not properly ended
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2007
Added on Mar 15 2007
1 comment
341 views