How to lock a lock in SQL Server 2005. I am running sql to lock rows, and this
SELECT *
FROM authors
WITH (HOLDLOCK, ROWLOCK)
WHERE au_id = '274-80-9391'
it works fine, but in this case the row is blocked for updating not for selection. I just want to know how to lock a row, as a result, another user cannot see this row when releasing SQL in SQL Server. please guide me. thank
source
share