Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par Muhammad Hammad Javaid , IT Project Manager , Dubai Islamic Bank
Date de publication: 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?