i got mysql error on this statement i don't know why [closed]
- by John Smiith
i got mysql error on this statement i don't know why error is:
#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 'CONSTRAINT fk_objet_code FOREIGN KEY (objet_code) REFERENCES objet(code) ) ENG' at line 6
sql code is
CREATE TABLE IF NOT EXISTS `class` (
`numero` int(11) NOT NULL AUTO_INCREMENT,
`type_class` varchar(100) DEFAULT NULL,
`images` varchar(200) NOT NULL,
PRIMARY KEY (`numero`)
CONSTRAINT fk_objet_code FOREIGN KEY (objet_code) REFERENCES objet(code)
) ENGINE=InnoDB;;