Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 2 select(count(*)) in a query
IB <Ismael.BALLO_at_NOSPAMcern.ch> wrote in message news:<3BAB1401.EFC34354_at_NOSPAMcern.ch>...
> Hi,
>
> I've got 2 tables and I ask to myself if we can count total elements of
> the 2 tables in one query
>
> Ex : select count(*) from A + select count(*) from B.
> 'This' is not possible but is there a way ?
>
> Thanks in advance.
How about
select atot + btot
from
(select count(*) atot
from a
)
,
(select count(*) btot
from b
)
Hmmm, I need to ask a fee for adressing homework equivalent to the number of blocks the query consumes.
Regards,
Sybrand Bakker, Senior Oracle DBA Received on Fri Sep 21 2001 - 08:27:59 CDT
![]() |
![]() |