|
Posted by Erland Sommarskog on 09/18/05 00:19
laurenq uantrell (laurenquantrell@hotmail.com) writes:
> Is it possible to use With (NOLOCK) and With (READPAST) in the same
> SELECT query and what whould be the syntax?
The syntax would be
SELECT ... FROM tbl WITH (NOLOCK, READPAST)
But I got the error message:
Server: Msg 650, Level 16, State 1, Line 1
You can only specify the READPAST lock in the READ COMMITTED or
REPEATABLE READ isolation levels.
Which makes sense. READPAST means that you skip rows that you would be
blocked on, and you will not be blocked with NOLOCK.
What are you trying to achieve?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|