Re: select/insert/delete

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Wed, 8 Jun 2011 10:13:23 +0200
Message-ID: <BANLkTikFb9G5i+t9rGVgrqZK5G0d9eDyXA_at_mail.gmail.com>



I saw merge was suggested, but without mentioning that merge actually can do deletes as well in recent versions...

I haven't tested it, but what if you merge into a view that joins you table_a and table_b together. Then it might fulfill your 3 statements in 1 go.

Stefan


Stefan P Knecht
CEO & Founder
s_at_10046.ch

10046 Consulting GmbH
Schwarzackerstrasse 29
CH-8304 Wallisellen
Switzerland

Phone +41-(0)8400-10046
Cell +41 (0) 79 571 36 27
info_at_10046.ch
http://www.10046.ch


On Wed, Jun 8, 2011 at 1:12 AM, Michael Moore <michaeljmoore_at_gmail.com>wrote:

> 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
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 08 2011 - 03:13:23 CDT

Original text of this message