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

  • SEARCH
  • Home
  • 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 8424237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:56:01+00:00 2026-06-10T03:56:01+00:00

This question is out of a databases exam i was looking at, so it

  • 0

This question is out of a databases exam i was looking at, so it might be nothing one can ever use in a real situation…

What output does the following valid SQL statement produce? Explain your answer!

SELECT (NULL = NULL);

I can easily produce the output of the statement, which is

school=> select (null = null);
 ?column?
----------

(1 row)

in psql 8.4.11, but how and why this is the answer i don’t know… I would have guessed it tries to evaluate the expression inside the brackets and comes up with true/false but apparently it doesn’t.

Any hints on why it behaves like it does?

Thanks

  • 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-06-10T03:56:03+00:00Added an answer on June 10, 2026 at 3:56 am

    NULL stands for “Unknown Value”. It is not known whether a value is true or false or anything else.

    So, when comparing two unknown values, what would the answer be? Is UnknownA equal to UnknownB?

    Answer? Unknown…

    Here is an example for SQL Server:

    IF (NULL = NULL)
      PRINT 'Equals'
    
    IF (NULL != NULL)
      PRINT 'Not Equals'
    
    
    IF (NULL IS NULL)
      PRINT 'IS'
    
    IF (NULL IS NOT NULL)
      PRINT 'IS NOT'
    

    The only thing that gets printed: IS

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

Sidebar

Related Questions

This question might not seem very technical but, out of curiosity,I want to know
This is my first question ever at stackoverflow, hope I make sense out of
UPDATE: This question is out of date, but left for informational purposes. Original Question
ASP.Net MVC3 is cool and all but I have this question more out of
This question is just out of interest, and perhaps could be useful for my
I was checking out this question which has this code - (NSArray *) percentagesRGBArray:(float[])
I've read this question to figure out how to set float:none on an element
This question is mostly academic. I ask out of curiosity, not because this poses
This question most closely relates to the asp.net mvc3 framework. It started out as
I know this is not the only question out there, but I still couldn't

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.