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
How to select some specific rows from a table in ms sql server?
What is a unique index?
What are partitioned views?
What is RMS migrations?
What is the data tier application?
what is blocking? : Sql server database administration
Which sql server table is used to hold the stored procedure script?
Can a database be shrunk with users active?
What is store procedure? How do they work?
What is use of @@ spid in sql server?
What is a transactions?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
Why truncate is ddl command?
between cast and convert which function would you prefer and why?
How to provide values to user defined function parameters?