Write a query to delete duplicate records in SQL SERVER
Answer Posted / sujit kumar suman,new delhi
DELETE DUPLICATE RECORDS FROM TABLE IN SQL SERVER:
DELETE FROM TABLE1
WHERE
ID NOT IN
(SELECT MAX(ID) FROM TABLE1
GROUP BY NAME)
WHERE ID IS IDENTITY FIELD AND NAME IS DUPLICATE FIELD
TRY THIS QUERRY AND ENJOY.......
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is filter index?
What is a benefit of using an after insert trigger over using a before insert trigger?
What are data files?
What is normalization 1nf 2nf 3nf?
What do you mean by data integrity?
How to create a simple stored procedure in ms sql server?
Explain what you mean by 3 tier architecture.
Indexes are updated automatically is the full-text index also updated automatically?
Explain the advantages of merge replication?
Can you explain powershell included in sql server 2008?
How does clustered and non clustered index work?
What are the different types of sub-queries?
What is policy based management (pbm)? : sql server database administration
What is a join in sql?
can you instantiate a com object by using t-sql? : Sql server database administration