TABLOCKX
sql server - TABLOCK vs TABLOCKX - Stack Overflow[^]: If you are in a transaction and you grab an exclusive lock on a table, EG: SELECT 1 FROM TABLE WITH (TABLOCKX)No other processes will be able to grab any locks on the table, meaning all queries attempting to talk to the table will be blocked until the transaction commits.
SELECT 1 FROM TABLE WITH (TABLOCKX)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)