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 -> Count two tables with duplicate check

Count two tables with duplicate check

From: <MHakimjavadi_at_gmail.com>
Date: 13 Sep 2005 17:42:18 -0700
Message-ID: <1126658538.785783.54440@f14g2000cwb.googlegroups.com>


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

Original text of this message

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