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

Describe sql comments?

754


How do we use distinct statement? What is its use?

791


What is the mutating table and constraining table?

765


Which query operators in sql is used for pattern matching?

742


What is a delimiter in sas?

755


What is sql stand for?

770


What is the most restrictive isolation level? : Transact sql

813


Differentiate pl/sql and sql?

770


How to prepare for oracle pl sql certification?

821


Can you sum a count in sql?

764


How can you tell the difference between an index and a view?

718


How do rank () and dense_rank () differ?

756


What is the difference between inner join and left join?

767


Can we use update in sql function?

798


What is plpgsql language?

737