Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Count two tables with duplicate check
Hi
I need to count the number record in two tables with duplicate check, so I have:
Table a - X
Y Z Table B X W K
The query should return 5 because recode X is duplicate. I tried like this:
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.
Thanks Received on Tue Sep 13 2005 - 19:42:18 CDT