Thursday, November 21, 2013

Hold the Lock on Table and Execute Query First

SET TRANSACTION ISOLATION LEVEL READ COMMITTED;

BEGIN TRAN T1

 DELETE FROM Temp WITH(HOLDLOCK, ROWLOCK);

COMMIT TRAN T1