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 transact-sql language?
How to get all stored procedures in sql server?
How to receive output values from stored procedures?
What is query and its types?
What is a trace frag?
How is a full-text index updated?
Using the customer, and order table in northwind database, please write a query to produce xml?
What is triggers and its types?
Explain stored procedure?
How to delete multiple rows with one delete statement in ms sql server?
What are null values in ms sql server?
How to assign null values to variables or columns?
What is filestream?
How to generate create view script on an existing view?
What is difference between drop truncate and delete?