Home Forums SQL Server 2008 T-SQL (SS2K8) DIFFERENCE BETWEEN NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008 RE: DIFFERENCE BETWEEN NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008

  • I will ignore your comment about suggesting that always using NOLOCK is a good idea when integrity of the results is not important.:w00t:

    To be clear (and to avoid being the guy who suggested someone use always use NOLOCK in any situation) I do want to point out that I included the caveat, "If NOLOCK is required..." I think my point would have been clearer if I said: If there is a requirement to use NOLOCK then use the always use WITH. That said, I can't think of a good reason to use NOLOCK and aver that a requirement that anyone must use NOLOCK is ridiculous. 😉

    Edit: Just Louis' response; that is what I meant... Thank you sir.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001