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

What version is sql?

547


What does varchar include?

517


What is the difference between delete and truncate statement in sql?

487


What is trigger in sql?

574


How can I see all tables in sql?

535






give the syntax of grant and revoke commands? : Sql dba

609


how to increment dates by 1 in mysql? : Sql dba

539


How can you load multi line records? : aql loader

652


What is using in sql?

553


How is indexing done in search engines?

527


How do you drop a trigger?

535


What is nvarchar max in sql?

572


What are the different types of tables in sql?

478


How do I quit sql?

489


What is the process of debugging?

543