Re: select/insert/delete
Date: Wed, 8 Jun 2011 17:32:46 +0100
Message-ID: <3DB7AD3D53144788B412AE5FFFD305FC_at_Primary>
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.
PL/SQL
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.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
- Original Message ----- From: "Michael Moore" <michaeljmoore_at_gmail.com> To: "ORACLE-L" <oracle-l_at_freelists.org> 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.
>
> Regards,
> Mike
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1382 / Virus Database: 1511/3687 - Release Date: 06/07/11
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Jun 08 2011 - 11:32:46 CDT