NULL & 'NULL'

  • Comments posted to this topic are about the item NULL & 'NULL'

  • Thanks for the question.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • simple one, thanks 🙂

  • very simple..but good Q for beginers

  • Good post to understand the difference between 'NULL' and Null....;-)

  • Nice Question for Beginners ... 🙂



    [font="System"]Bhavesh Patel[/font]

    http://bhaveshgpatel.wordpress.com/
  • For once in a long while, an uncontroversial answer 🙂

  • vitesh.bhana (2/4/2010)


    For once in a long while, an uncontroversial answer 🙂

    Really! My favorite part of QotD is the ensuing argument! "I ran the script on 2005 Express with CONCAT_NULL_YIELDS_NULL set to OFF and I got a different result!!!" That's when things get fun!

    (No, I didn't.)

    Ron Moses

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • So I was like, of course they are null. you do not ahve to set it to null it is already null so of course the answer is A.

    Then I slapped my forehead when I realized I missed the single quotes in the select @v1 = 'NULL' line.

  • ronmoses (2/4/2010)

    Really! My favorite part of QotD is the ensuing argument!

    Ron Moses

    Me, too. I often learn more from the ensuing discussions.

    Julie

  • For more fun.....

    declare @t1 table (id1 int identity(1,1) primary key, [null] varchar(20))

    insert into @t1 values('Null')

    insert into @t1 values(null)

    insert into @t1 values(default)

    declare @t2 table (id2 int identity(11,1) primary key, [null] varchar(20))

    insert into @t2 values('Null')

    insert into @t2 values(null)

    insert into @t2 values(default)

    select * from @t1

    select * from @t2

    select *

    from @t1 t1

    cross join @t2 t2

    where t1.[null] <> t2.[null]

    select *

    from @t1 t1

    cross join @t2 t2

    where t1.[null] = t2.[null]

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • There is nothing good about NULL. Discuss. 😀

  • The problem is about to go away. See Steve's Editorial for April 1, 2010.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • The Dixie Flatline (4/1/2010)


    The problem is about to go away. See Steve's Editorial for April 1, 2010.

    🙂

Viewing 14 posts - 1 through 14 (of 14 total)

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