If Exists/If Not Exists

  • Can someone help me and describing what the clause If Exists and If NOT Exists do?

    When should someone use this type of programming? I am running into them alot in stored procedures but I am clueless....

    Thanks

  • The best link I found so far: Gails blog[/url]



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Start with this - http://msdn.microsoft.com/en-us/library/ms188336.aspx. The performance stuff that I wrote (link Lutz posted) can wait until you understand what they do.

    Once you've gone through that (and experimented with code), a better blog post than the round up is the first of the series - http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply