Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Count two tables with duplicate check
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