How to remove duplicate rows from a table?.

Answer Posted / vamsi

for example our emp table have duplicate rows than we can
run this query to delete those duplicate rows

Delete from emp a
where rowid <> ( select max(rowid) from emp where empno =
a.empno);

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can triggers stop a dml statement from executing on a table?

699


What is pl sql package?

692


What are the sql versions?

590


What is the maximum number of columns in sql table?

663


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

626






What is procedure explain with example?

622


what are the advantages of sql ? : Sql dba

640


What is sql trigger example?

644


What is data control language?

634


What is sql*loader and what is it used for?

670


Can we create a trigger on view?

579


What is the difference between a procedure and a function?

586


What is a mutating table and a constraining table?

665


What are the various restrictions imposed on view in terms of dml?

608


Is natural join and inner join same?

585