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 the least restrictive isolation level? : Transact sql
What is the difference between the repeatable read and serializable isolation levels? : Transact sql
What is union, minus and interact commands?
what is the sql query to display current date? : Sql dba
How can we Get the Updated Rows? ie, There is 100s of Rows i updated the Rows who have salary 5000. then i want to select the Updated Rows. How can we achieve it?
What is package in pl sql with an examples?
What is the use of prepared statement?
Can we update views in sql?
I need a exceptoin in pl/sql block so that if any errors occur in the block then no exception should errors should raise?
create a store procedure and created synonms for that store procedure after modify that store procedure will effect on synonms? If we delete the store procedure what happened to that synonms?
Can we commit inside a trigger?
Explain what is a view?
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)