I\'m writing a SQL Server stored procedure in which I want to lock a table for update before executing the body of the stored procedure. I don\'t want to prevent other processe
TABLOCK
Specifies that a lock is taken on the table and held until the end-of-statement. If data is being read, a shared lock is taken. If data is being modified, an exclusive lock is taken. If HOLDLOCK is also specified, a shared table lock is held until the end of the transaction.
When used with the OPENROWSET bulk rowset provider to import data into a table without indexes, TABLOCK enables multiple clients to concurrently load data into the target table with optimized logging and locking.
Taken from: http://msdn.microsoft.com/en-us/library/ms187373(SQL.90).aspx