Re: How could select count(*) return no row ???

From: S. Kannan <skannan_at_cardinal.fs.com>
Date: 1995/08/21
Message-ID: <41a6sr$jjh_at_cardinal.fs.com>#1/1


Alain Barrette (barrette_at_jrv.qc.ca) wrote:
: If I use the following statement
 

: Select count(*) from table
: where 1 = 0,
: It return 0.
 

: If however I try to do something like
 

: Select count(*) from table
: where 0 = (select count(*) from table where 1 = 0);
 

: It give me no rows selected ?!?!?
 

: How or why could this be ?

Hi Alain Barrette,

That is surprising! I am running Oracle 7.1.6.2.0 on HP-UX and the above sql statement returns 0, as expected. What is your Oracle version/OS ?

Thanks.

--
---------------------------------------------------------------------------
Kannan (Mastech Corporation)
Email: skannan_at_fs.com

The above are my own comments and opinion. They do not purport that of 
anybody else.
---------------------------------------------------------------------------
Received on Mon Aug 21 1995 - 00:00:00 CEST

Original text of this message