Manually deciding locking mode in MSSQL In MSSQL, when a lock is acquired with a statement, the locking mode is decided by the engine not by the programmer. Is there a way to force the engine to use a specified Locking Mode (i.e. Row Lock)?
Sure, there are plenty of table hints, like:


PAGLOCK
ROWLOCK
TABLOCK
TABLOCKX


However, you should use these with extreme caution. There are very few cases where the average programmer knows better than the engine, and forcing hints can cause more problems than they solve.