Re: Selecte nd NULLs

From: Raza Siddiqui <raza.siddiqui_at_oracle.com>
Date: Wed, 25 Mar 2015 07:51:54 -0700
Message-Id: <0DA481A7-ADBB-4E8A-803E-BC0C9F032DA1_at_oracle.com>



If you want to show rows with NULLs then incorporate NVL(cluster)

Per TJ - nulls are indeterminate..ie NULL is not zero or space

On Mar 25, 2015, at 7:13, TJ Kiernan <tkiernan_at_pti-nps.com> wrote:

> In a word, Nope.
>
> NULL is unknown, so you won’t get results back on equality comparisons (= or <>).
>
> http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements005.htm
>
> Thanks,
> T. J.
>
>
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of James Clarence Allen (CENSUS/EPD FED)
> Sent: Wednesday, March 25, 2015 9:04 AM
> To: Oracle Chat freelist
> Subject: Selecte nd NULLs
>
> Someone,
>
> I am doing a simple select.
>
> SQL>select distinct dbname from mytable where cluster != 'orrac1';
>
> I have a three column table "mytable" (dbname,sid,cluster). The table contains 206 total rows/136 rows with distinct dbname. No indices are on the table.
>
> Some dbnames are not in a cluster (single server) so the cluster column is null.
>
> When I run the select above the rows with the null in cluster column are not returned.
>
> Shouldn't all rows be turned except what I am filtering out?
>
> Sincerely,
> Jim Allen
> Database Support Lead, MASSDB Staff
> Schedule: Mon-Fri, 7:00am-3:30pm
> Tel: 1-301-763-7501
> Cell: 1-202-604-7286
> Database Help Desk: X34944
> Support Email: James.Clarence.Allen_at_census.gov
> Internal Website: http://epd.econ.census.gov/offices/massdb/
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 25 2015 - 15:51:54 CET

Original text of this message