write sub query for eliminating duplicate rows using
analytical function?

Answer Posted / vyshak

delete from table where rowid not in (select max(rowid) from
table group by all column names);

or

delete (dense_rank() over(partition by all column names))dn
from table where dn>2;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use pl sql in sql server?

538


What is the difference between rename and alias?

707


Can we create table inside stored procedure?

532


What is consistency?

714


What are the basic sql commands?

549






Is hadoop a nosql?

573


What is the difference between cluster and non-cluster index?

618


explain about mysql and its features. : Sql dba

548


What is the use of partition by in sql?

517


Explain ddl statements in pl/sql?

578


What are functions in sql?

510


Does truncate require commit?

543


How can you fetch first 5 characters of the string?

554


How is pl sql different from sql?

546


What is sql table?

522