Re: Theoretical Basis for SELECT FOR UPDATE

From: Misha Dorman <misha_at_no_mishapen_spam.co.uk>
Date: Thu, 06 Oct 2005 23:09:16 +0100
Message-ID: <11kb7rbkb90djc3_at_corp.supernews.com>


vc wrote:
> SELECT FOR UPDATE is not needed for databases with a locking
> concurrency scheduler (SQL Sever, etc) and consequently not
> implemented there.

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). Received on Fri Oct 07 2005 - 00:09:16 CEST

Original text of this message