1. 程式人生 > >linux mysql----You have an error in your SQL syntax; check the manual that corresponds to your MySQL

linux mysql----You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Mysql 語句毛病

(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 'nulluser_id varchar(20) not null,foreign key(user_id) references user_surface(us' at line 1")

用mysql構造一個表 發現一直報錯  

剛開始以為  自己什麼語句寫錯了什麼的      找了好半天

最後發現  要麼少了個    ,   逗號

要麼多了個    )   括號

 

長個記性   以後出錯  先去找符號問題