Hi, In Query Analyzer, if I use NO LOCK in a select statement will it ensure that no locks will be used when the query executes?
If you add WITH (NOLOCK) after a table name in the FROM clause, then no locks will be held on that table for the duration of the query. However, you may also get dirty results, as updates and deletes from other processes are being ignored.
When you specify the NOLOCK hint, the query both doesn't issue shared locks and also doesn't care about already existing exclusive locks. Thus, you will get the result back very fast, but at the risk of probably being incorrect. Have a look at thsi: http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=12779 -- Frank Kalis Microsoft SQL Server MVP Webmaster:http://www.insidesql.de Heute schon gebloggt?http://www.insidesql.de/blogs
... and also refer to the books online for the LOCKING hints and other related topics. Satya SKJ Microsoft SQL Server MVP Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided �AS IS� with no rights for the sake of knowledge sharing.