Un exemplu din Inside SQL Server 2000:
USE pubs
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
BEGIN TRAN
SELECT * FROM authors (UPDLOCK) WHERE au_id='172-32-1176'
-- Add 5 sec sleep to widen the window for the deadlock
WAITFOR DELAY '00:00:05'
UPDATE authors SET au_lname='Updated by '
+ CONVERT(varchar, @@spid) WHERE au_id='172-32-1176'
COMMIT TRAN
Ceva asemenator aici:
http://mikedimmick.blogspot.com/2004/03/selectupdate-problem-or-why-updlock.html
* Putzin "off topic" - in articolul de mai jos, vezi "locking
escalation behavior ... for a specific index"