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


Please Help Members By Posting Answers For Below Questions

What is the latest version of microsoft sql server?

488


What is user-defined inline table-valued function?

523


How to link tables in sql server?

481


how to use DTS package in 2000,2005,2008 in sql server

1457


Explain about unique identifier data type in sql server?

516






How to add a new dsn with the odbc driver for sql server?

559


How except clause is differs from not in clause?

538


What is linked report?

89


Explain few examples of RDBMS?

617


Does hive support indexing?

525


Why use triggers?

577


Explain datetime2 data type in sal server 2008?

549


OPTIMIZATION OF SP,CURSOR,TRIGGERS

2213


What is stored procedures?

548


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

534