Delete duplicate records from the table?(Table must have
unique id)
Answer Posted / brijesh darmwal, sandhya
DELETE FROM [MyDb].[dbo].[sandhya]
WHERE id
IN
(SELECT id
FROM
(SELECT MAX(id) as id,name,addr
FROM [MyDb].[dbo].[sandhya] GROUP BY name,addr having
count(id)>=2)
Tmp)
Is This Answer Correct ? | 7 Yes | 16 No |
Post New Answer View All Answers
please differentiate between delete and truncate?
What are the new features are introduced in sql server 2012 reporting services?
How to create a simple stored procedure in ms sql server?
What is named query? : sql server analysis services, ssas
Explain query editor regions
what data regions are and what are the different data regions?
How to remove duplicate rows from table except one?
What are different type of Collation Sensitivity?
Tell me what is sql profiler?
Explain something about security and SQL Azure?
Find columns used in stored procedure?
What is subreport?
What is difference between unique and primary key?
What are constraints?
What is database black box testing?