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 bcp? When is it used?

0 Answers  


What is a scalar value in sql?

0 Answers  


How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". It consists of multiple columns. Then if we insert rows into this table with duplicate records then how can we retrieve only duplicate records from that table?

28 Answers   Alps, Aricent, Bank Of America, Wipro,


Define overloaded procedure?

0 Answers  


Can a foreign key be null?

0 Answers  






What is Highwatermark?

3 Answers   Thermotech,


How to execute multiple sql statements in a single annonymous block irrespective of the sql statement result?

2 Answers  


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

0 Answers  


what are string data types? : Sql dba

0 Answers  


how do you know the version of your mysql server? : Sql dba

0 Answers  


Does sql profiler affect performance?

0 Answers  


when MSQL8.0 is in market

0 Answers  


Categories