Click here to Skip to main content
Click here to Skip to main content

Tagged as

To find duplicate rows in table

, 31 Jan 2012
Rate this:
Please Sign up or sign in to vote.
To find duplicate rows in table
--To find duplicate rows in table

select colname, count(colname) from TableName
Group by colname Having (count(colname) > 1)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Gaushick
Software Developer
India India
.Net Programmer

Comments and Discussions

 
GeneralIf colname allows NULL value then use count(*) instead of co... PinmemberBoBsEd2-Feb-12 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 31 Jan 2012
Article Copyright 2012 by Gaushick
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid