SQL Server row locking

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

+3
source share
2 answers

, SQL-. , , SQL- . , (: Read Uncommitted), .

+2

, READPAST SQL Server. , , , . :

, , . READPAST, .

SELECT READPAST .

+1

Source: https://habr.com/ru/post/1784029/


All Articles