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
What are different types of raid levels?
What is a mutating table error and how can you get around it?
What does asynchronous call backs means?
Is it possible in sql table to have more than one foreign key?
Which tools are available to manage SQL Azure databases and servers?
What is 2nf in normalization?
How to round a numeric value to a specific precision?
What is an identity column in insert statements?
Why I am getting "the microsoft .net framework 2.0 in not installed" message?
What is the difference between substr and charindex in the sql server?
What kind of problems occurs if we do not implement proper locking strategy?
Mention the differences between local and global temporary tables.
What do you mean by collation recursive stored procedure?
What is the recovery model?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?