Last active
November 8, 2020 19:58
-
-
Save 2803media/9251644 to your computer and use it in GitHub Desktop.
doublon mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT (c1.id), c1 . * FROM cm_service_CAF c1 LEFT OUTER JOIN cm_service_CAF c2 ON c2.id != c1.id AND c2.CODGEO = c1.CODGEO WHERE c2.id IS NOT NULL | |
| ### Plus rapide | |
| SELECT COUNT(*) AS nbr_doublon, identifiant FROM cm_users GROUP BY identifiant HAVING COUNT(*) > 1 | |
| #delete | |
| ALTER IGNORE TABLE cm_dvfdatas | |
| ADD UNIQUE INDEX CODGEO (CODGEO); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment