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
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
Where can you add custom error messages to sql server?
How to move database physical files in ms sql server?
What according to you is the difference between mysql and sql server performance?
What is the difference between left and right outer join?
Mention the different types of triggers?
How to create a view on an existing table in ms sql server?
What are the types of stored procedures in an sql server?
How can we call UDF(User Define Function) using C# code in ASP.net ?
What is analysis service repository?
what is the system function to get current user's user id? : Sql server database administration
How many types of attribute relationships are there? : sql server analysis services, ssas
How much is a sql server license?
what kind of lan types do you know? : Sql server database administration
What is instead of dml trigger?