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?
2 ответов
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.
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