| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Theoretical Basis for SELECT FOR UPDATE
Misha Dorman wrote:
> vc wrote:
> > SELECT FOR UPDATE is not needed for databases with a locking
> > concurrency scheduler (SQL Sever, etc) and consequently not
> > implemented there.
There are important differences between SELECT FOR UPDATE and the UPDLOCK hint.
>
> So why does SQL Server (6.5 up) provide
> SELECT .. FROM tablename (UPDLOCK)
> ?
>
> It is (as someone else pointed out) useful to avoid some forms of
> deadlock (due to the promotion of S to X locks).
It would be me ;) Again, strictly speaking, the UPDLOCK is not required because a locking database ensures consistent results without it, and it's up to the programmer to decide whether retrying a failed transaction is better or worse in comparison to making conflicting transactions run serially. Received on Thu Oct 06 2005 - 18:39:46 CDT
![]() |
![]() |