bonjour,
j'ai une table qui contient des doublons relatifs que je voudrais supprimer.
je voudrais donc utiliser ce code pris sur developpez.com:
mais j'ai l'erreur suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 DELETE FROM ouvrage o where o.idouvrage > any (select idouvrage from ouvrage q where o.idouvrage<>q.idouvrage and o.auteur=q.auteur and o.titre=q.titre);
MySQL a répondu:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where o.idouvrage > any (select idouvrage from ouvrage q where o.idouvrage<>q.id' at line 1
donc voila
si quelqu'un peu m'aider
a savoir que ce code fonctionne parfaitement:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 select * FROM ouvrage o where o.idouvrage > any (select idouvrage from ouvrage q where o.idouvrage<>q.idouvrage and o.auteur=q.auteur and o.titre=q.titre);
merci d'avance.
Partager