SQL Server Performance

Select with NOLOCK

Discussion in 'SQL Server 2005 General Developer Questions' started by rupeshpatel, Nov 6, 2008.

  1. rupeshpatel New Member

    Hello Everyone,I never used NOLOCK hint with select command, I have following question.If I issue NOLOCK hint on one of the Table[Table1] inside my select statement, will it be applied to other select statements issued against Table1 as well? or will it be limited to my select statement only. I want to make sure that, once I issue NOLOCK hint on Table1, Other user/application who is running Select statements against Table1 should not have NOLOCK, otherwise I am gone!!!... Please reply..Thanks in advance.RP
  2. Varsham New Member

    The NOLOCK hint will be used only for the query which has the hint.
    Please make sure you are fully aware of the risks related to this particular hint.
  3. Adriaan New Member

    The WITH options (hints) are applied to a single table (index) in a single query. They're part of the SELECT syntax, and so they only affect the isolated query statement in which they occur.
    Alternatively, you might add SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED before a query (or series of queries). SET options affect only the current connection (but not any preceding query statements that have already been executed).
  4. rupeshpatel New Member

    That was really helpful... Thank you very much.
  5. mufford New Member

Share This Page