write sub query for eliminating duplicate rows using
analytical function?

Answers were Sorted based on User's Feedback



write sub query for eliminating duplicate rows using analytical function?..

Answer / korimantu

delete from table name where rowid not in(select max(rowid)
from group by last_name);

or

delete from table name where rowid>(select min(rowid) from
where a.last_name=b.last_name);

Is This Answer Correct ?    4 Yes 2 No

write sub query for eliminating duplicate rows using analytical function?..

Answer / 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

write sub query for eliminating duplicate rows using analytical function?..

Answer / guest

select distinct

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

what is 'mysqlshow'? : Sql dba

0 Answers  


Is pl sql a programming language?

0 Answers  


How to rename a column in the output of sql query?

0 Answers  


I need to write a simple query,which one is better select statement or stored procedure?and why?

2 Answers   iGate,


How do you concatenate in sql?

0 Answers  






What is the difference between nested table and varray?

0 Answers  


What are string functions in sql?

0 Answers  


display null value rows with out using null function?

8 Answers   Infosys,


What is time based sql injection?

0 Answers  


What is difference between procedure and trigger?

0 Answers  


What is trigger in sql and its types?

0 Answers  


What is the cause of mutating table error and how can we solve it?

0 Answers  


Categories