Re: select/insert/delete

From: David Litchfield <>
Date: Wed, 08 Jun 2011 00:52:55 +0100
Message-ID: <>

On 08/06/2011 00:47, David Litchfield wrote:
> On 08/06/2011 00:12, Michael Moore 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.
> Yes you can... but it requires a bit of trickery (a function that'll > execute arbitrary sql)... Follow the example below...

Or you could use a trigger to fire after an insert on table_b to delete to data in table_a... Which is probably the more sane way of doing it, lol :)

Received on Tue Jun 07 2011 - 18:52:55 CDT

Original text of this message