Foreign key

Résolu/Fermé
madeog Messages postés 74 Date d'inscription vendredi 12 octobre 2018 Statut Membre Dernière intervention 2 mars 2021 - 3 mars 2019 à 20:22
jordane45 Messages postés 38145 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 25 avril 2024 - 3 mars 2019 à 22:00
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
A voir également:

1 réponse

jordane45 Messages postés 38145 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 25 avril 2024 4 650
3 mars 2019 à 22:00
Bonjour,
Commence déjà par ça
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

local en fait parti...

0