0

how to find the repeated data in the system???

repeated data can be eliminated by using DISTINCT,but how to find which data is repeated or duplicate in the database?

23rd Sep 2016, 3:54 PM
saranya.N
saranya.N - avatar
2 odpowiedzi
0
Like I am confused on your question because the SQL server will have primary keys and can have multiple primary keys as well as to be set Unique meaning that the data entered in a unique column must all be different and can't have duplicate. I am not sure how to remove the data from an existing DB without deleting the entire row of data if you changed the properties.
23rd Sep 2016, 6:27 PM
Catlin
Catlin - avatar
0
If you want to find you can use the group by and having clause with count >1 eg. SELECT COL1,COL2 WHERE CONDITON GROUP BY COL1,COL2 HAVING COUNT(COL1)>1
25th Sep 2016, 1:19 AM
Sandeep