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: 2 select(count(*)) in a query

Re: 2 select(count(*)) in a query

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 24 Sep 2001 13:02:02 +0100
Message-ID: <3baf20c0$0$230$ed9e5944@reading.news.pipex.net>


Doesn't work

SQL> select count(*) from aaguser
  2 union all
  3 select count(*) from audit_trail;

  COUNT(*)


      2971
        21


--
Niall Litchfield
Oracle DBA
Audit Commission UK
"Rene Nyffenegger" <rene.nyffenegger_at_gmx.ch> wrote in message
news:a6d06107.0109210641.29250850_at_posting.google.com...

> >
> > 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.
>
>
> select count(*) from a union all select count(*) from b
>
> hth
> Rene
Received on Mon Sep 24 2001 - 07:02:02 CDT

Original text of this message

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