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

Home -> Community -> Usenet -> c.d.o.misc -> id <> '2'

id <> '2'

From: mike <hillmw_at_charter.net>
Date: 21 Sep 2005 14:31:54 -0700
Message-ID: <1127338314.870584.213820@g49g2000cwa.googlegroups.com>


I have a field defined as follows:

id integer

This field normally has some value in it 1,2,3,4, but it can be null.

For example, say I have 10 records, and 5 records have values 1,2,3,4,5, but the other 5 are null

If I do a select like:

select *
from mytable
where id='2'

I get 1 record.

If I do a select like:

select *
from mytable
where id<>'2'

I get 4 records, but shouldn't I be getting 9 records?

How would i change my select to get the 9 records?

Mike Received on Wed Sep 21 2005 - 16:31:54 CDT

Original text of this message

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