Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: "= null" & "is null"

Re: "= null" & "is null"

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 26 Aug 1999 11:55:17 GMT
Message-ID: <37c82ab7.3107147@newshost.us.oracle.com>


A copy of this was sent to Norris <johnnie_at_cooper.com.hk> (if that email address didn't require changing) On 26 Aug 1999 11:40:22 GMT, you wrote:

>What is the difference between = null and is null?
>
>--

the major difference is that "is null" will alway evaluate to either TRUE or FALSE whereas "= null" will NEVER evaluate to TRUE OR FALSE (it is unknown).

Consider:

tkyte_at_8.0> select * from dual where null is null;

D
-
X

tkyte_at_8.0> select * from dual where null = null;

no rows selected

tkyte_at_8.0> select * from dual where null != null;

no rows selected

It is almost always an error (cannot think of a case where it is not an error) to say " = null"

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Aug 26 1999 - 06:55:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US