Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "= null" & "is null"
Thanks for the review. Now I know in oracle, if I use "= null", it always returns false. But the problem is if a column is allow-null by default, then when query on the column, I always need to add "is null" in the where clause since all other operators such as "< > decode" does not work normally with non-null values.
Ed Prochak <prochak_at_my-deja.com> wrote:
> In article <7q3936$37f$2_at_imsp009a.netvigator.com>,
> Norris <johnnie_at_cooper.com.hk> wrote:
>> What is the difference between = null and is null? >> >> -- >> -- >> http://www.washington.edu/pine/faq/ >>
> Time for you to review SQL's three valued logic. To relate this
> to your question, consider these examples:
> where X is NULL
> This condition is always either TRUE or FALSE.
> where X = NULL
> This condition is always FALSE.
> Consider that second example for a moment. NULL means no value
> set, ie the value is UNKNOWN. SOoo..
> ...if X has a value then X=NULL is obviously FALSE.
> ...if X is NULL then its value is UNKNOWN and X=NULL cannot be
> determined. So it gets treated as if it is FALSE.
> --
> Ed Prochak
> Magic Interface, Ltd.
> ORACLE services
> 440-498-3700 <<<NOTE new number
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
--
Have several nice days...
http://www.ntfaq.com http://www.jsiinc.com/reghack.htm http://www.oconnell.net/Sybase_FAQ http://www.cyberport.com/~tangent/programming/winsock/ ===================================================================Received on Thu Aug 26 1999 - 21:22:19 CDT
![]() |
![]() |