Results 1 to 9 of 9

Thread: Newbie in SQL

  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Question Unanswered: Newbie in SQL

    Hi
    Wats the use of NULL in SQL?
    HOw do you use NULL in DBTables?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    NULL is the absence of a value

    see SQL: Defining and Visualizing NULLs
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2008
    Location
    Along the shores of Lake Michigan
    Posts
    242
    Do a search on some of the web boards about null. Some pretty heated discussions (may have been on this site!) about it but very inciteful.

  4. #4
    Join Date
    Jan 2009
    Location
    United Kingdom
    Posts
    77
    It's a place holder. How you use it will depend on your app. I usually try and place some value to avoid confusion

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Jack Vamvas
    I usually try and place some value to avoid confusion
    what about numeric columns? what value do you use there?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    NULL is an undefined or unknown value, where's the confusion?
    George
    Home | Blog

  7. #7
    Join Date
    Feb 2004
    Posts
    193

    Talking

    NULL is neither equal to NULL nor unequal to NULL. See how simple that is.

    It's a good thing the "answer to the equation of the universe" is not null. That way we can understand it.........it's "42" and everyone can understand that.

    ddave

  8. #8
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by Jack Vamvas
    It's a place holder. How you use it will depend on your app. I usually try and place some value to avoid confusion
    Huh.
    I usually avoid confusion by NOT placing any value in it.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  9. #9
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    saw a great analogy the other day

    it was in relation to the big bang and to the question of what happened before the big bang

    the analogy was: what is north of the north pole?


    (hint: NULL)


    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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