write a query to delete similar records in same table

Answer Posted / apurva

delete from <tablename> rowid not in (select max(rowid)
from <tablename> group by <col.name where there are
repeating records>);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need cursors in pl sql?

780


Why is partition used in sql?

833


how to shutdown mysql server? : Sql dba

821


What is multiple columns?

826


List the ways to get the count of records in a table?

700


Does truncate need commit?

734


What is the difference between cross join and natural join?

806


What are pl sql data types?

776


Is sql workbench free?

769


What is pl sql architecture?

740


What is a primary key called that is made up of more than one field?

1097


How do I make sql search faster?

801


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

912


How do you modify a column in sql?

776


Is it possible to include an insert statement on the same table to which the trigger is assigned?

776