Question

When writing a SQL statement in SQL Server 2005, does the READUNCOMMITTED query hint imply NOLOCK or do I have to specify it manually too?

So is:

With (NoLock, ReadUnCommitted)

the same as:

With (ReadUnCommitted)
Was it helpful?

Solution

Yes they are one and the same

OTHER TIPS

According to Kalen Delaney...

The NOLOCK hint has nothing to do with the index options. The hint tells SQL Server not to request locks when doing SELECT operations, so there will be no conflict with data that is already locked. The index options just tell SQL Server that this level of locking is allowed, when locking is going to occur. For example, if ALLOW_ROW_LOCKS was off, the only possible locks would be page or table locks. The index options don't force locks to be held, they just control the possible size of the locks.

In answer to the question in your subject, the NOLOCK hint and the READUNCOMMITTED hint are equivalent.

I think you can say that

ReadUnCommitted has the abilities of NoLock

However you cannot say that

NoLock has the abilities of ReadUnCommitted

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top