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.
| Author |
Topic |
|
allan8964
Posting Yak Master
249 Posts |
Posted - 2012-06-20 : 15:24:46
|
| Hi there,Is there any way to find the duplicated rows in a table?Thanks in advance. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
|
|
comparin.fabio
Starting Member
3 Posts |
Posted - 2012-06-20 : 15:43:08
|
| Hi,try this:SELECT FIELD1FROM TABLE1GROUP BY FIELD1HAVING COUNT(*) > 1If FIELD1 has duplicates on table count(*) will be greater than 1Hope this help.ByeCF |
 |
|
|
allan8964
Posting Yak Master
249 Posts |
Posted - 2012-06-20 : 16:13:40
|
| Guys thank you so much. comparin.fabio's code is exactly what i need!!! The links are also very helpful. Thanks again. |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2012-06-20 : 18:42:27
|
| If you'd entered your question into google, or even just looked at the front page you would have got to this point 18 minutes faster! |
 |
|
|
|
|
|