Results 1 to 4 of 4

Thread: Is null

  1. #1
    Join Date
    Mar 2004
    Posts
    205

    Unanswered: Is null

    Hi,

    Please give the difference between the below two queries :

    select sno from test where name = null

    select sno from test where name is null

    Please advice,

    Thanks,
    Sam

  2. #2
    Join Date
    Jan 2004
    Posts
    492
    The first query is not valid -

    Second one is. In Oracle you can only evaluate nulls using is/is not null. Because NULL does not really exist, it can never ever be equal or not equal to something.
    Oracle OCPI (Certified Practicing Idiot)

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >where name = null
    Will NEVER be true (is ALWAYS false); because NULL does not "=" anything

    WHERE NULL = NULL --> is ALWAYS false.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Mar 2004
    Posts
    205
    Thanks for your quick response.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •