Lock Hints

Posts   
 
    
Luleus
User
Posts: 1
Joined: 10-Jan-2007
# Posted on: 11-Jan-2007 16:00:31   

Is it possible to include lock hints (particularly for SQL Server 2005 where they are called table-level hints) during a fetch just like in the following code (in the context of a transaction):

SELECT ... From [table_name] WITH (UPDLOCK, ROWLOCK) WHERE Id = ...

which is be very handy for a finer control over locking.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005