Delete duplicate records from the table?(Table must have
unique id)
Answer Posted / krishna
select *
from mytable b
join
(
select Duplicatecolumn,MAX(id) id
from mytable
group by Duplicatecolumn
) b1 on b.Duplicatecolumn = b1.Duplicatecolumn
where b.id <> b1.id
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How can we call UDF(User Define Function) using C# code in ASP.net ?
How do I run a trace in sql server?
What xml support does the sql server extend?
Does a full backup include transaction log?
What is dknf in normalization form?
What is log shipping?
How do I start sql server?
List out the different types of locks available in sql server?
How to provide values to user defined function parameters?
What according to you is the difference between mysql and sql server performance?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
How to delete a login name in ms sql server?
What are the differences between decimal and float in ms sql server?
How to find out the list schema name and table name for the database?
How to create a trigger for insert only?