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

what is sp_pkeys? : Transact sql

889


How to pipe multiline string to isql?

758


Why is sql better than hql?

686


How to get list of all tables from a database?

842


Can I create table without primary key?

733






What is sql in java?

755


What does 0 mean in sql?

694


what is a stored procedure? : Sql dba

783


What does where 1/2 mean in sql?

759


Is sqlite thread safe?

787


How do you use collections in procedure to return the resultset?

1999


What is plpgsql language?

713


What is gpt format?

697


What is a sql schema used for?

729


what is a cursor? : Sql dba

745