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 the benefits of using soa architecture?
Tell me how to debug the report?
Can u give the Documentation of Custom.pll in oracle apps
Do you know what is applysys in oracle application database schema, what is apps?
How do you register report in oracle apps?
What is the concept of soa governance?
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.
CAN YOU CUSTOMISE THE COUTOMISE CUS_TOP
What are do's and dont's of Interface?
What is sca and how is it useful?
pls send me out bound code of supplers,site,bankiformation code pls as soon as
What is a value set? List its various types.
tell my any difficult situtation you solved in your experience in your company?
List of all the modules under Manufacturing, Finance and Distribution in oracle applications?
what is the difference between request group and request security in oracle apps?