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!

Insert and delete in one statement ?

559172Mar 12 2007 — edited Mar 12 2007
Hi, I was wondering if it was possible to insert into one table and delete another table in the same sql.

Well .. lets consider these two tables....

SQL> select * from test7;

NUM1 NUM2 NUM3
---------- ---------- ----------
4 4 4
5 5 5
6 6 6


SQL> select * from test6;

NUM1 NUM2 NUM3 NUM4
---------- ---------- ---------- ----------
1 1 1 1
1 1 1 1
2 2 2 2
3 3 3 3

Is there anyway i can insert say one row from test6 .. the row with third row from test6 into table test7 and then delete that row from test6 ? ... Is this possible in one single SQL statement ... I think i can do something with MERGE .. but i'm not sure ...
:(
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2007
Added on Mar 12 2007
6 comments
1,041 views