Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

I have multiple records in a table and do not have any primary key/ unique key. How to delete duplicate records keeping actual records?

user-image
Question added by Muhammad Hammad Javaid , IT Project Manager , Dubai Islamic Bank
Date Posted: 2013/04/05

its better to have a unique key at least on one of the tables, but if not you have to:
1- get the results from table 1
2- get results from table 2
3- store both results in a new table and remove the duplicates.
-------------------------------------------------------------------------------------- if not possible: you may try this: "long way" DELETE FROM table_X1 AS T1 WHERE EXISTS ( SELECT 1 FROM table_X2 AS T2 WHERE T2.Fieldname = T1.Fieldname AND T2.Fieldname = T1.Fieldname AND T2.Fieldname = T1.Fieldname AND T2.Fieldname = T1.Fieldname ) ------------------------------ hope it will work with you :)

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.