RE: IN ignore null values

  • From: "Niall Litchfield" <n-litchfield@xxxxxxxxxxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 20 Feb 2004 14:47:09 +0000

In the first case you are testing for equality against NULL.=20
Niall Litchfield
Oracle DBA
Audit Commission
+44 117 975 7805=20


> -----Original Message-----
> From: jreyes@xxxxxxxxxxxxxxxx=20
> Sent: 20 February 2004 14:32
> To: aore@xxxxxxxxxxxxxxxx; cmonroy@xxxxxxxxxxxxxxxx;=20
> dpuna@xxxxxxxxxxxxxxxx; dvenegas@xxxxxxxxxxxxxxxx;=20
> ilujan@xxxxxxxxxxxxxxxx; jdaza@xxxxxxxxxxxxxxxx;=20
> jdsanchez@xxxxxxxxxxxxxxxx; jreyes@xxxxxxxxxxxxxxxx;=20
> jsalazar@xxxxxxxxxxxxxxxx; lchalco@xxxxxxxxxxxxxxxx;=20
> oracle-l@xxxxxxxxxxxxx; rpacheco@xxxxxxxxxxxxxxxx
> Subject: IN ignore null values=20
>=20
>=20
> An interesting observation
>=20
> IN ignore  null values as you can see in the table there are=20
> 310 null values
> in column TBL_DSM.
>=20
> SQL> select count(*) from daz.utl_tablas_me
>=20
>   2  where tbl_dsm in
>=20
>   3  (select null from daz.utl_tablas_me);
>=20
>  COUNT(*)
>=20
> ---------
>=20
>         0
>=20
> SQL> select count(*) from daz.utl_tablas_me
>=20
>   2  where exists(select null from daz.utl_tablas_me);
>=20
>  COUNT(*)
>=20
> ---------
>=20
>       310
>=20
>=20
>=20
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>=20
>=20



**********************************************************************
This email contains information intended for
the addressee only.  It may be confidential
and may be the subject of legal and/or
professional privilege.  Any dissemination,
distribution, copyright or use of this
communication without prior permission of
the sender is strictly prohibited.
**********************************************************************

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: