ich habe die folgende Einweisung in mysql erstellt, aber irgendwie bekomme ich immer eine Fehlermeldung. könnte mir vielleicht jemand sagen woran es liegt?
CREATE TABLE item (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
message_id int(8) ,
item_id int(8) ,
text text ,
isLeaf varchar(8) ,
relevance double(8) ,
result varchar(8) ,
FOREIGN KEY (item_id),
PRIMARY KEY (id)
);
"Error 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 '> ,
result varchar ,
FOREIGN KEY ,
PRIMARY KEY ’ at line? "
[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]
"Error 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 '> ,
result varchar ,
Hast du da wirklich statt () ? Wenn ja, wie im ersten Posting () nehmen.
Nebenbei natürlich auch noch die Spalte „text“ entweder umbennenen, oder, wenn du dir den Stress machen willst, den Namen überall escapen ( text ), da text nunmal ein reserviertes Wort ist.