| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Theoretical Basis for SELECT FOR UPDATE
vc wrote:
> But any update in the database already locks the rows being updated.
> What is gained by the comma operator ? If you mean that concurrent
> select operations will be blocked during a set of comma delimited
> operators execution, then in fact you convert all database
> transactions from being concurrent to serial. If I misunderstood you,
> please elaborate.
No, the comma operator has nothing to do with other, concurrent transactions really. It has to do with making the transaction atomic *from the perspective of the session performing the operation*. Gene has already given a good example about printing information half-way through the transaction; that might look like this:
update account set bal=bal+10 where ac_no=123; call print_total_balance_for_all_accounts; update account set bal=bal-10 where ac_no=456; commit;
The TTM version would make it impossible to print the intermediate total (which would be 10 higher than it should be). Received on Mon Oct 03 2005 - 07:09:28 CDT
![]() |
![]() |