Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to find duplicate values for a field

Author  Topic 

mr_dayal
Starting Member

37 Posts

Posted - 2008-07-03 : 04:32:29
suppose I have a table with only one field. There may be some duplicate values in this field ..
What will be the query to retrive those rows who have two or more then two occurences?

Mr Dayal

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-03 : 04:35:21
[code]select somecol
from sometable
group by somecol
having count(*) > 1[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -