How to retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?
Answer Posted / anil kumar karasi
1.
Select from <table name A>
where rowid > (select min(rowid) from <table name B>
where A.keyvalues=B.keyvalues);
2.
Delete from <table name A>
where rowid > (select min(rowid) from <table name B>
where A.keyvalues=B.keyvalues);
| Is This Answer Correct ? | 12 Yes | 9 No |
Post New Answer View All Answers
What is self join in sql server joins?
What are a scheduled jobs or what is a scheduled tasks?
What is schemabinding a view?
What do you know about system database? : SQL Server Architecture
How to replace the Query Result 'Null Value' with a text ?
What stored by the model?
What is join query?
how many layers of tcp/ip protocol combined of? : Sql server database administration
Which tcp/ip port does sql server run on? How can it be changed?
Which Model uses the SET concept
What does Master database contains?
Why do we backup Active Directory ?
How to list all objects in a given schema?
Please explain what is “asynchronous” communication in sql server service broker?
What is a dataset and what are the different types of datasets?