I want to find duplicate names from my database I wrote the following query. But it is displaying more that existing records. I guess it is taking cartesian product.
select a.name from emp from emp a,emp b where a.name=b.name;
can anyone correct this query.
I want to display all the duplicate records having same names...
for example for the following table. I want to display result having same dname like
DEPTNO DNAME LOC
------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
50 SALES hyd
output should be
30 sales chicago
50 sales hyd