Table:
ProductComapny
Fields:id,name
ProductComapny content 10000 recorde.
now i want id set primary key But a number of id recordings have been repeated
1.how can id set primary key???
2.how can remove duplicate recorde?
3.How can I get the number of duplicate records?
BY SQL In SqlServer And MySql
For Study
Answered for
SQL Server– This won’t work inMySQL. Please specify which, rather than patronising people who are able to help you.To get the count of duplicates:
To apply a primary key, first delete the duplicates as follows:
Then use Management Studio to apply your primary key.