| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: "Transactions are bad, real bad" - discuss
"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news:<KLCra.5$735.322_at_news.oracle.com>...
> How about
>
> UPDATE (
> select a1.AccountOwner ao1, a1.Balance b1, a2.AccountOwner ao2,
> a2.Balance b2
> from Accounts as a1, Accounts as a2
> ) set b1 = b1 - 1000000, b2 = b2 + 1000000
> where ao1 = 'Paul Vernon' and ao2 = 'Jonathan Leffler'
Nice, but it does not work with all SQL DBMSs
What about?
update Accounts set Balance := Balance - 1000000
where AccountOwner = 'Paul Vernon',
update Accounts set Balance := Balance + 1000000
where AccountOwner = 'Jonathan Leffler';
It is a lot easier to understand.
Regards
Alfredo
Received on Wed Apr 30 2003 - 05:14:16 CDT
![]() |
![]() |