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
How many times can we commit in a loop?
How to raise user-defined exception with custom sqlerrm ?
how to add a new column to an existing table in mysql? : Sql dba
What is natural join in sql?
What are different types of triggers?
If a cursor is open, how can we find in a pl/sql block?
how do you know the version of your mysql server? : Sql dba
How can triggers be used for the table auditing?
How would you pass hints to the sql processor?
What is the sql*loader? : aql loader
What packages are available to pl/sql developers?
what are the join types in tsql? : Transact sql
What is the use of nvl function?
What is the need of merge statement?
what is the difference between clustered and non clustered index in sql? : Sql dba