Write an SQL Query to
Delete Duplicate records from a table using ROWID.

Answer Posted / bharath

1.SELECT ROWID FROM TABLE T1
WHERE ROWID NOT IN (SELECT MIN(ROWID)
FROM TABLE T2 WHERE T1.KEY=T2.KEY);

THIS QUERY IS USEFUL WHEN WE HAVE A KEY VAL.
2.
i.CREATE TABLE NEW AS SELECT DISTINCT * FROM OLD;
ii.DROP TABLE OLD;
iii.RENAME NEW TO ORIGINAL;
THIS IS WHEN WE APPLY TO DELETE DUPLICATE ROWS..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oracle soa suite?

752


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.

2452


What is oracle soa suite and what are its different components?

639


What are the different components of soa suite?

712


Explain what are the tables of auto invoice?

635






How is choreography different from orchestration?

641


What are the Standard Reports and Forms in HRMS?

1758


What is the concept of soa governance?

758


Hi any one plz help me .i need 2 or 3 customized and 2 or 3 development reports on PO module..if any body having plz send me with one by one step ,i mean where u do the customization and wht are the steps u follwed when u do the customization,wht are fields u added or deleted ,How u added or these fields as per clinet requirement and wht are errors u faced .plz send it to my mail id iamvenki@gmail.com

1879


Do you know what are user profiles in apps. Any examples you can give?

648


What is count(*) from po_vendors(any table)?

634


What is a flexfield? List out its types.

654


what are the prerequisites for costing transactions?

2626


How to retry multiple errored workflow processes? What is the access level in workflow used for? How do you define start and end functions in workflow? How does they differ from normal functions? Give me some workflow tables? What is the difference between a function and notification in workflow? I have sent two different notifications to two different users and I want to wait till both they are approved to send 3rd notification. How can you achieve it? What is item type and item key in workflow? How do you use attribute values in workflow messages? How do you use lookups in workflow? What are roles in workflow and how they are used? How do you download or upload a workflow from a server? What are steps to customize the workflow? What functions can you perform from workflow administrator responsibility? To send an email to the user workflow notification is the only way or is there any other ways to send it? Give me some workflow standard procedures? How can you run/start/kickoff workflow? What is wf_engine package used for? How many processes can each workflow contain? What is Runnable option in workflow? At what level it exists? What are different types of attributes in workflow? How do you reassign a notification? What is process in workflow? How can you send direct oracle form link through workflow notifications? How can you send a notification to multiple users? Can you change the list dynamically? Can you send html code in workflow notification? I have sent two different notifications to two different users and I want to wait till atleast one is approved to send 3rd notification. How can you achieve it?

4302


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

1968