Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Count two tables with duplicate check

Re: Count two tables with duplicate check

From: Geoff Muldoon <geoff.muldoon_at_trap.gmail.com>
Date: Wed, 14 Sep 2005 11:28:09 +1000
Message-ID: <MPG.1d9227b776ee0c259896ee@news.readfreenews.net>


MHakimjavadi_at_gmail.com says...

> I need to count the number record in two tables with duplicate check,
> so I have:

> Select (DISTINCT AAA) from
> (Select emp_num AAA from A
> union all
> Select emp_num AAA from B)
>
> and it is working fine but very slow. Please advice.

Look up the difference between "union all" and just "union".

G Received on Tue Sep 13 2005 - 20:28:09 CDT

Original text of this message

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