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


Please Help Members By Posting Answers For Below Questions

In hierarchical structure of a database? we have write query from where we should start?

1708


List of all the modules under Manufacturing, Finance and Distribution in oracle applications?

1802


how can develope the po variance and po summary report? with tables mandatory columns and query please?

1975


tell me the scenarios of the independent in reports

2051


Hi  Friends this is preetham, i am  searching for job on oracle apps(technical) i put 3 years fake exp, so any one  please could you help me for realtime interview  questions and 9739782164 this is my no srpsrp777@gmail.Com please guys please provide your no for contact i have a doubts i want to clarify

1569






What is a value set? List its various types.

650


Can you define an erp system?

681


Tell me how to find the custom directory in front end?

662


What is a flexfield? List out its types.

667


do you know is it possible to run the interface without using oracle apps?

650


What do you understand by soa?

693


what is pay run id ?

1710


Tell me where we find the status of order information?

667


In which tables receopt application form Appliy to field Value will come. I know one table i.e, ra_customer_trx.trx_number. Could U please any one tell me other than this except(ra_customer_trx and ar_payment_schedules_all tables). plz mentioned tables_name.Column_name.

2466


Can you differentiate between mediator and osb?

627