Bonjour,

Je voudrais créer des clés étrangères et fixer des contraintes d'intégrité sur une table InnoDB.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
ALTER TABLE bl_action_profile 
ADD FOREIGN KEY action_id REFERENCES bl_action( action_id ) 
ON DELETE CASCADE
J'obtiens l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
MySQL a répondu:Documentation
#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 'REFERENCES bl_action (action_id)
ON DELETE CASCADE' at line 3