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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: is null / = null query

RE: is null / = null query

From: Weerd Kirsten, E.C. de <Kirsten.deWeerd_at_Oranjewoud.nl>
Date: Thu, 9 Nov 2000 16:13:44 +0100
Message-Id: <10675.121579@fatcity.com>


In our programs we frequently use NVL to provent possible errors ... Perhapse a Hint you should also give to your programmers ...

Greets,

Kirsten

> -----Original Message-----
> From: GKor_at_rdw.nl [SMTP:GKor_at_rdw.nl]
> Sent: Thursday, November 09, 2000 4:01 PM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: is null / = null query
>
> i mentioned this because the programmer could make an error (use = instead
> of is)
> but the output is very different!
>
> > -----Oorspronkelijk bericht-----
> > Van: Koivu, Lisa [SMTP:lkoivu_at_qode.com]
> > Verzonden: 9-nov-00 15:52
> > Aan: 'ORACLE-L_at_fatcity.com'; 'gkor_at_rdw.nl'
> > Onderwerp: RE: is null / = null query
> >
> > This is the correct answer, because NULL is never EQUAL to NULL. There
> > are a few exceptions (NVL, DECODE) but
> > the classic defition of NULL is "unknown value", therefore you can't
> > determine it's value at all.
> >
> > I know this is theory gook, but it's the reasoning behind what you saw.
> >
> > HTH
> >
> > Lisa Rutland Koivu
> > Oracle Database Administrator
> > Qode.com
> > 4850 North State Road 7
> > Suite G104
> > Fort Lauderdale, FL 33319
> >
> > V: 954.484.3191, x174
> > F: 954.484.2933
> > C: 954.658.5849
> > <http://www.qode.com>
> >
> > "The information contained herein does not express the opinion or
> position
> > of Qode.com and cannot be attributed to or made binding upon Qode.com."
> >
> >
> > -----Original Message-----
> > From: GKor_at_rdw.nl [ <mailto:GKor_at_rdw.nl>]
> > Sent: Thursday, November 09, 2000 9:16 AM
> > To: Multiple recipients of list ORACLE-L
> > Subject: is null / = null query
> >
> >
> >
> >
> > Hi everyone
> >
> > I have launched the following query in SQL*PLUS
> >
> > SQL> L
> > 1* SELECT COUNT(*) FROM WERK_ORDER WHERE RESULT_CODE_WO = NULL;
> > SQL> /
> > 0
> >
> > 1 row selected.
> >
> > SQL> SELECT COUNT(*) FROM WERK_ORDER WHERE RESULT_CODE_WO IS NULL;
> > 301
> >
> > 1 row selected.
> >
> > SQL>
> >
> > i did'nt expect to get answer on the first query
> >
> > anyone with an explanation or is this a undocumented feature ?
Received on Thu Nov 09 2000 - 09:13:44 CST

Original text of this message

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