Foreign key

Résolu
madeog Messages postés 74 Date d'inscription   Statut Membre Dernière intervention   -  
jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour,

j'ai écris une commande mais cela ne marche pas. pouvez vous m'aider
MariaDB [bellefamille]> create table local(id_local int NOT NULL, nom_local varchar(100), des_local varchar(255), id_edu int AUTO_INCREMENT, [/contents/1055-sql-contraintes-d-integrite PRIMARY KEY] (id_local), CONSTRAINT `FK_local_educateur` FOREIGN KEY (id_edu) REFERENCES educateur(id_edu) ON DELETE cascade ON UPDATE restrict;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1

1 réponse

jordane45 Messages postés 38486 Date d'inscription   Statut Modérateur Dernière intervention   4 752
 
Bonjour,
Commence déjà par ça
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

local en fait parti...

0