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)
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)
I think you can say that
ReadUnCommitted has the abilities of NoLock
However you cannot say that
NoLock has the abilities of ReadUnCommitted
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 don't think either answer has answered my question yet. I want to know for certain if I apply ReadUncommitted that is applies NoLock in the background too?