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: select count(*)

Re: select count(*)

From: Martin Douglas <Martin.Douglas_at_Boeing.com>
Date: 1999/08/10
Message-ID: <37B03428.D620336C@Boeing.com>#1/1

Consider:

select * from(
  select col1, col2, total_record
  from table1, (select count(*) as total_record from table1) )
where col1 >= 2;

COL1 COL2 TOTAL_RECORD
------------ ------------ ------------

           2            2            3
           3            3            3

-Martin-

Maiko wrote:
>
> select col1, col2 , a from table1, (select count(*) a from table1)
> /
>
> On 10 Aug 1999 09:00:09 GMT, Norris <johnnie_at_cooper.com.hk> wrote:
>
> >In SQL Server, I can do the following queries:
> >
> >select col1, col2, count(*) total_record
> >from table1
> >
> >select col1, col2, (select count(*) from table1) total_record
> >from table1
> >
> >In Oracle, how can I do that?
  Received on Tue Aug 10 1999 - 00:00:00 CDT

Original text of this message

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