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 -> Re: Weird "select count(*)..."

Re: Weird "select count(*)..."

From: Steven Whatley <swhatley_at_blkbox.com>
Date: 1997/06/10
Message-ID: <5njp54$hvi@news.blkbox.com>#1/1

"Eric L'HUILLIER" <elhuilli_at_ifremer.fr> wrote:
: SQL> select count(*) from plan_comptable
: 2 where pcg_numcptgen = pcg_numcptgen
: 3 and pcg_libcptgen = pcg_libcptgen
: 4 and pcg_typsolde = pcg_typsolde
: 5 and pcg_duramort = pcg_duramort
: 6 and pcg_detail = pcg_detail
: 7 and pcg_numlig = pcg_numlig;

:

: COUNT(*)
: ---------
: 0

If any of the columns are NULL you get the condition where NULL = NULL. This is always FALSE.

Hope this helps.

Later,
Steven
http://www.blkbox.com/~swhatley/

                      _|_  |  _|_   "I am the way and the truth and
Steven Whatley         | --|-- |    the life.  No one comes to the
swhatley_at_blkbox.com    |   |   |    Father except through me."
Houston, Texas             |            -- Jesus Christ (John 14:6 NIV)
                           |
Received on Tue Jun 10 1997 - 00:00:00 CDT

Original text of this message

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