Write an SQL Query to
Delete Duplicate records from a table using ROWID.
Answer Posted / amit bhatnagar
Swati is cool. buth her queries are correct. you can either
take rowid >with subquery fetching minimum (rowid) else
Rowid < with subquery fething maximum (row id)
DELETE FROM <table_name> T1
WHERE T1.ROWID > (SELECT MIN(T2.ROWID)
FROM <table_name> T2
WHERE T2.<common column name> = T1.<common
column name>)
----------------------------
DELETE FROM <table_name> T1
WHERE T1.ROWID < (SELECT MAX(T2.ROWID)
FROM <table_name> T2
WHERE T2.<common column name> = T1.<common
column name>)
Good job Swati.. :)
Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
What do you understand by a set of books?
please any one provide the oracle erp technical interview questions on modules(PO,AP,AR,INV,GL,OM)wise to my mail id..narendra_609@yahoo.co.in
What are the different components you should consider while defining a responsibility in oracle apps?
How can we import the data into a database using sql * loader?
Which oracle apps version you are very confident in?
Are you familiar with internet architecture of oracle apps 11i?
How do you register report in oracle apps?
What is the concept of soa governance?
what is global tempory table?
Do you know what are user profiles in apps. Any examples you can give?
Which oracle applications pl/sql standard apis you are familiar, have you used most of them?
In hierarchical structure of a database? we have write query from where we should start?
List the various types of value set.
What does appl_top directory contain?
how can i print random rows in plsql table