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: Questions re subqueries

Re: Questions re subqueries

From: Luke Davies <luke.davies_at_hansard.com>
Date: Wed, 20 Jun 2007 09:07:32 +0100
Message-id: <4678E044.3080203@hansard.com>

A NULL will not equate to anything not even NULL, and also a NULL will not NOT equate to anything either. So ...

select count(*) from dual
where NULL = NULL

Will get zero rows

select count(*) from dual
where NULL != NULL

Will get zero rows

Basically you will get a false result using NULLs unless you use the special syntax IS NULL or IS NOT NULL. Also DECODE will allow you to equate NULL.

HTH
Luke

The contents of this message and any attachments are confidential and are intended for the use of the persons to whom it is addressed. If you are not the intended recipient, you should not copy, forward, use or alter the message in any way, nor disclose its contents to any other person. Please notify the sender immediately and delete the e-mail from your system. The sender is not responsible for any alterations that may have occurred without authorisation. Any files attached to this email will have been checked by us with virus detection software before transmission. You should carry out your own virus checks before opening any attachments, as we do not accept any liability for loss or damage which may be caused by viruses.

For information regarding company registration please visit the contact page at www.hansard.com

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 20 2007 - 03:07:32 CDT

Original text of this message

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