Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 571511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:30:54+00:00 2026-05-13T13:30:54+00:00

Could anyone explain the usage of NULL in database tables? What is it used

  • 0

Could anyone explain the usage of NULL in database tables? What is it used for and how is it useful?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:30:54+00:00Added an answer on May 13, 2026 at 1:30 pm

    It is useful to mark “unknown” or missing values.

    For instance, if you’re storing people, and one of the fields is their birthday, you could allow it to be NULL to signify “We don’t know when he was born”.

    This is in contrast to having non-nullable fields where, for the same type of meaning, you would need to designate a “magic value” which has the same meaning.

    For instance, what date should you store in that birthday field to mean “we don’t know when he was born”? Should 1970-01-01 be that magic value? What if we suddenly need to store a person that was born on that day?

    Now, having said that, NULL is one of the harder issues to handle in database design and engines, since it is a propagating property of a value.

    For instance, what is the result of the following:

    SELECT *
    FROM people
    WHERE birthday > #2000-01-01#
    
    SELECT *
    FROM people
    WHERE NOT (birthday > #2000-01-01#)
    

    (note, the above date syntax might not be legal in any database engine, don’t get hung up on it)

    If you have lots of people with an “unknown” birthday, ie. NULL, they won’t appear in either of the results.

    Since in the above two queries, the first one says “all people with criteria X”, and the second is “all people without criteria X”, you would think that together, the results of those two queries would produce all the people in the database.

    However, the queries actually say “all people with a known and definite criteria X.”

    This is similar to asking someone “am I older than 40?” upon which the other person says “I don’t know”. If you then proceed to ask “am I younger than 41?”, the answer will be the same, he still doesn’t know.

    Also, any mathematics or comparisons will produce NULL as well.

    For instance, what is:

    SELECT 10 + NULL AS X
    

    the result is NULL because “10 + unknown” is still unknown.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anyone explain with some examples when it is better to call functions by
Could anyone explain me why: function doAjax() { var xmlHttpReq = false; try {
Could anyone point me to a resource that explains WCF with pictures and simple
Could anyone could point me to some code/give me ideas on how to create
Could anyone recommend a good BAML Decompiler / Viewer besides BAML Viewer plugin for
Could anyone suggest a good packet sniffer class for c++? Looking for a easy
Could anyone can tell me where I can find full ASP.NET MVC beta documentation?
C#: Could anyone give me good example on how anchoring controls at runtime is
ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for
I need to get substed drive letter in Perl. Could anyone kindly help me?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.