View previous topic :: View next topic
|
Author |
Message |
ssowmya
New User
Joined: 10 Oct 2006 Posts: 40
|
|
|
|
Hi
Could any of u pls tell me how to extract only duplicate rows from table? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
HI There,
Code: |
SELECT C1, COUNT(*)
GROUP BY C1
HAVING COUNT(*)>1
WITH UR; |
Here C1 is the coloum which u r taking to identify duplicate.
Correction r welcome |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
If you want get result using SQL, then try using GROUP BY and HAVING clause:
Example:
Code: |
SELECT <COLUMN_NAME> , COUNT(*) FROM TABLE.NAME
GROUP BY <COLUMN_NAME>
HAVING COUNT(*) > 1
|
Result will give how count of how many duplicates also.
One more way is to download table and use SORT to get duplicate rows. |
|
Back to top |
|
|
|