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
Do you know concepts and capabilities of sql server?
Differentiate between sql temp table vs table variable?
What are unicode character string data types in ms sql server?
How we create SQL Server 2005 Reporting Services ? Give me Sample
How does Report Builder support Analysis Services cubes?
How to use group functions in the select clause in ms sql server?
What is ms sql server triggers?
How to insert multiple rows with one insert statement in ms sql server?
Explain “@@rowcount” and “@@error” in sql server?
Which operator do you use to return all of the rows from one query except rows are returned in a second query?
What do you think of this implementation? Can this be implemented better?
Can binary strings be used in arithmetical operations?
what are user defined datatypes? : Sql server database administration
What is openrowset sql server?
Explain how you can configure a running aggregate in SSRS?