write sub query for eliminating duplicate rows using
analytical function?
Answers were Sorted based on User's Feedback
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 |
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 |
what is bcp? When is it used?
What is a scalar value in sql?
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?
Can a foreign key be null?
What is Highwatermark?
How to execute multiple sql statements in a single annonymous block irrespective of the sql statement result?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
what are string data types? : Sql dba
how do you know the version of your mysql server? : Sql dba
Does sql profiler affect performance?
when MSQL8.0 is in market