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

Answer Posted / ankit kumar srivastava

DELETE FROM EMP_a WHERE ROWID NOT IN(
(SELECT MAX(ROWID) FROM EMP_a a GROUP BY
EMPNO,ENAME,sex,doj,sal,deptno,mgr HAVING COUNT(ROWID)
=1)
UNION
(SELECT MAX(ROWID) FROM EMP_a a GROUP BY
EMPNO,ENAME,sex,doj,sal,deptno,mgr HAVING COUNT(ROWID)>1))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is applysys in oracle application database schema, what is apps?

663


Tell me how to debug the report?

629


In sequence i want to 11 and 15th values how we will write?

1567


What are do's and dont's of Interface?

1896


Can you define an erp system?

669






Suppose for report I have to parameters those are from_date and to_date, so to_date should be greater when compare to from_date, if we are giving to_date is lessthen it must shows some error how we will make?

621


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

639


If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?

1638


what are the different transaction clauses in AR?

1595


Tell me where we find the status of order information?

659


Which oracle apps version you are very confident in?

695


What are the Standard Reports and Forms in HRMS?

1760


How can we import the data into a database using sql * loader?

673


How can you achieve loose coupling in soa framework?

712


Are you familiar with internet architecture of oracle apps 11i?

622