write a query to delete similar records in same table

Answer Posted / nirmalendu

delete from table_name where rowid not in(select min(rowid)
from table_name group by column_name);

** column_name which having duplicate record

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you create an empty table from an existing table?

799


How would you convert date into julian date format?

791


Is hadoop a nosql?

745


Is record in pl sql?

677


What is raw datatype in sql?

725






How do I delete a trigger?

723


Why do we create views in sql?

778


How do you use join?

700


Explain the difference between rename and alias?

739


What is the difference between function and procedure in pl/sql?

748


What are the types of variables use in pl sql?

689


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

843


What is difference between db2 and sql?

721


how does a local variable is defined using t-sql? : Transact sql

730


how many sql dml commands are supported by 'mysql'? : Sql dba

790