Write an SQL Query to
Delete Duplicate records from a table using ROWID.
Answer Posted / parthasarathi
delete T1
from MyTable T1, MyTable T2
where T1.dupField = T2.dupField
and T1.uniqueField > T2.uniqueField ;
Try this will work for SQL Server and My Sql but not for
MSAccess .....
For MSAccess try the below one
delete from MyTable
where uniqueField not in
(select min(uniqueField) from MyTable T2
where T2.dupField=MyTable.dupField);
The above query also works for SqlServer but not for MySql..
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are do's and dont's of Interface?
What is sca and how is it useful?
what is the difference between request group and request security in oracle apps?
In oracle application how do you debug or trace errors?
List the types of flexfield?
can we use look up type instead of a pofile option?or valueset?is it possible how?
How to create a purchase order without a requisition?
List of all the modules under Manufacturing, Finance and Distribution in oracle applications?
what is global tempory table?
How can you achieve loose coupling in soa framework?
is it possible to run the interface without using oracle apps?
What is instead of trigger in where we will use?
What is oracle soa suite?
can we get profile values in report without using user exists is it possible how?
what are the balancing segments in AR?