Re: select/insert/delete

  • From: "Jonathan Lewis" <jonathan@xxxxxxxxxxxxxxxxxx>
  • To: <michaeljmoore@xxxxxxxxx>, "ORACLE-L" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 8 Jun 2011 17:32:46 +0100

Not possible - but the best option may depend on what problem you see as the biggest threat:
   Volume of data to move
   Complexity of identifying query
   Guarantee of correctness
   Threats from concurrency
   Complexity of code

In outline the following may be appropriate for high speed on a few thousand rows.
   select bulk collect from tableA for update
   forall insert into tableB
   forall delete from tableA

I'm assuming you can do the bulk collect with a For Update - but I may be wrong.


Jonathan Lewis

----- Original Message ----- From: "Michael Moore" <michaeljmoore@xxxxxxxxx>
To: "ORACLE-L" <oracle-l@xxxxxxxxxxxxx>
Sent: Wednesday, June 08, 2011 12:12 AM
Subject: select/insert/delete

I think the answer to this is NO, but just to be sure,

Is there a single SQL statement that can:

1) SELECT row-X from table A
2) INSERT row-X into table B
3) DELETE row-X from table A

It would be nice to be able to do this without a context switch.


No virus found in this message.
Checked by AVG -
Version: 10.0.1382 / Virus Database: 1511/3687 - Release Date: 06/07/11


Other related posts: