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 the command used to fetch first 5 characters of the string?

0 Answers  


How do I clear the screen in sql plus?

0 Answers  


Give an example of Full Outer Join?

1 Answers   IBM,


What can be a size of a pl/sql block? Is there any limit?

2 Answers  


What is the difference between inner join and left join?

0 Answers  






What does inner join mean?

0 Answers  


What is serial sql?

0 Answers  


Why do we use joins?

0 Answers  


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

0 Answers  


what is self-join? : Sql dba

0 Answers  


What is Temp Table and type of temp table?

1 Answers   HP, SLK,


What are triggers and its uses?

0 Answers  


Categories