How we can count duplicate entry in particular table ?

Questions by daulat

Showing Answers 1 - 13 of 13 Answers

There are many ways to find out the count of duplicate entry like

if table is

field_name varchar2

a

b

then select field_name,count(*) from table_name group by field_name having count(*)>1

will give the duplicate entry count

Regards

Ritesh Singh

09322070038

mala321

  • Dec 24th, 2007
 

Hello,

select duplicate_column,count(duplicate_column) from table1 
       group by  duplicate column
      having count(duplicate_column) >1;

  Was this answer useful?  Yes

sachin_dac

  • May 22nd, 2008
 

You can use these two methods to find out the Duplicate Entries. There are some more ways to do the same, But I am not able to recollect those at this time. Anyways these two will do the work for you.
        
        Select ename
        From emp
        Group by ename having count(ename) > 1 ;

        Select a.ename, b.empno
        from EMP a, EMP b
        where a.ename=b.ename
        and a.empno <> b.empno;

  Was this answer useful?  Yes

Showstopper

  • Jun 21st, 2010
 

We can count the duplicate entry in particular table by using the following query


select count(*)
from a b
where exists (select rowid
                       from a
                       where a.no1=b.no1
                       and a.rowid > b.rowid);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions