What is difference between Null and Literal Null?

  • What is difference between Null and Literal Null?

    refernce: http://msdn.microsoft.com/en-us/library/ms188048.aspx

    Thanks

  • You're misreading the article.What it talks about is a variable that is null or the literal value NULL. There aren't two types of nulls

    SET ANSI_NULLS ON affects a comparison only if one of the operands of the comparison is either a variable that is NULL or a literal NULL.

    A Literal is a constant passed to a query, so the following query has a literal 'abc'

    SELECT * FROM someTable Where somecol = 'abc'

    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
  • Yes..My Mistake..

    Thanks

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

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