开发者

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 TABLEbuying(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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜