SQL syntax error maybe because of the version I use
On phpMyAdmin, when I create this table the SQL is executed correctly but when I add al开发者_JAVA百科l the sql code I get an error saying
"#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 'CREATE TABLE
buying(
CustomerIDint(10) unsigned NOT NULL,
PurchaseI' at line 14`"
Why is that and how can I fix it ?
You have to use a semicolon ;
after each CREATE TABLE sometable ( )
statement.
CREATE TABLE `table1` (
...
);
CREATE TABLE `table2` (
...
);
If you are running multiple SQL statements, they need to be ended with a ;
(semi-colon)
精彩评论