Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql question...
On Thu, 12 Jun 1997 15:22:59 -0400, oispeggy_at_acsu.buffalo.edu wrote:
>
>Learn something new every day....
>
>1.
>select lname, fname This returns everyone with 'N' or 'G' or ' '.
>from resdemo None with 'Y'. None with null.
>where fellow != 'Y'
>
<snip>
>
>
>What surprised me is that #1 did not return anyone with a null value?
>I thought it would? Why didn't it?
>
Basically, NULL values are ignored in any test using comparison operators (=, !=, >, <, etc.). In order to cater for NULL values, you either have to wrap NVL around the item, or explicitly use the IS (NOT) NULL operator.
-- The above posting represents the personal opinions of the author and is not to be taken as official (or unofficial) policy or opinions of his employer. Remove XSPAM from mail_id if replying via email. Alex Heney, Living in the Global Village.Received on Fri Jun 13 1997 - 00:00:00 CDT
![]() |
![]() |