Showing posts with label SQL - Hold the Lock on Table and Execute Query First. Show all posts
Showing posts with label SQL - Hold the Lock on Table and Execute Query First. Show all posts

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