GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Certification  >  Oracle  >  Oracle Developer
Go To First  |  Previous Question  |  Next Question 
 Oracle Developer  |  Question 21 of 23    Print  
How we can count duplicate entry in particular table ?

  
Total Answers and Comments: 3 Last Update: May 22, 2008     Asked by: daulat 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 18, 2007 07:10:16   #1  
riteshrajsingh Member Since: December 2005   Contribution: 2    

RE: How we can count duplicate entry in particular tab...

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


 
Is this answer useful? Yes | No
December 24, 2007 00:47:40   #2  
mala321 Member Since: December 2007   Contribution: 6    

RE: How we can count duplicate entry in particular table ?
Hello

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

 
Is this answer useful? Yes | No
May 22, 2008 03:05:50   #3  
sachin_dac Member Since: May 2008   Contribution: 3    

RE: How we can count duplicate entry in particular table ?
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;

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape