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 foreign key sql?
What are the types of functions in sql?
difference between pl/sql table and normal pl/sql table
who introduced sql?
What is a rank in sql?
How to make a copy values from one column to another in sql?
explain primary keys and auto increment fields in mysql : sql dba
select top 3 sal from each dept?
17 Answers IBM, TCS,
Is pl sql useful?
What is character functions?
How we can update the view?
what is the main difference between join and subqurey?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)