Oracle Scratchpad

September 19, 2011


Filed under: NULL,Oracle — Jonathan Lewis @ 4:58 pm BST Sep 19,2011

A recent question from OTN:

What’s the difference between “{expression} is null” and “{expression}= null” ?

Technically we can say the following:

  • {expression} is null will evaluate to one of TRUE or FALSE
  • {expression} = null will evaluate to NULL

As a follow on from this: a predicate is satisfied if (and only if) it evaluates to TRUE; a constraint is satisfied if (and only if) it doesn’t evaluate to FALSE.

Three-valued logic catches everybody out occasionally.


  1. It catches my kids out all the time.

    Q: “Can I play the XBox when we get home?”.
    A: “Um … unknown”.

    Drives the little perishers crazy.

    I might start answering “Null”.

    Comment by David Aldridge — September 20, 2011 @ 8:42 am BST Sep 20,2011 | Reply

  2. ‘Multi-valued logic’ == illogical! ;)

    Comment by John Mc Elhinney — September 29, 2011 @ 10:44 pm BST Sep 29,2011 | Reply

  3. […] constraint does not evaluate to FALSE, the row is […]

    Pingback by Null – again « Oracle Scratchpad — September 7, 2012 @ 8:28 am BST Sep 7,2012 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Powered by