Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: count record from two tables with duplicate check
Hi:
in your select the "distinct" is not necessary, because when you do an
union, the selected records appear only once.
You can prove without distinct:
Select count( AAA) from
(Select emp_num AAA from A
union all
Select emp_num AAA from B)
It's can run a little fastest, but I donīt know if it's will be much
better.
Try it,
Regards,
Isa
Received on Wed Sep 14 2005 - 03:51:30 CDT
![]() |
![]() |