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
What is plpgsql language?
what is the difference between delete and truncate statement in sql? : Sql dba
What is sql rowcount?
What are local and global variables and their differences?
Does view store data in sql?
What is dcl in sql?
What is error ora-01000: maximum open cursors exceeded
What are all the different types of indexes?
What are the different types of tables in sql?
Write a sql query to get the third highest salary of an employee from employee_table?
what is the difference between clustered and non clustered index in sql? : Sql dba
What is crud stand for?
What is the use of %rowtype?
how to calculate the difference between two dates? : Sql dba
What is sql*loader?