Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> count record from 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 count(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:44:29 CDT
![]() |
![]() |