What is the purpose of ROWLOCK on Delete and when should I use it?
- by RPS
Ex)
When should I use this statement:
DELETE TOP (@count)
FROM ProductInfo WITH (ROWLOCK)
WHERE ProductId = @productId_for_del;
And when should be just doing:
DELETE TOP (@count)
FROM ProductInfo
WHERE ProductId = @productId_for_del;