2012-02-29 69 views
0

您的SQL語法有錯誤;檢查與您的MySQL服務器版本對應的手冊,以便在第1行附近使用'charset utf8 not null auto_increment索引鍵,toId int(11)charset utf8 not'使用的正確語法sQl好友:你的SQL語法有錯誤;

創建表,使用SQLBuddy接口..

follows: 
    id (primary key, autoincrement,utf8) - int(11) 
    toId (utf8) - int(11) 
    fromId (utf8) - int(11) 

enter image description here

問題是:爲什麼?

+0

你可以發佈整個查詢嗎? – 2012-03-01 00:00:48

+0

它不顯示我,設置的屏幕張貼 – 2012-03-01 00:05:20

回答

1

您可以從3 int列中刪除「utf8」設置嗎?

+1

這應該是一個評論,除非你準備斷言這是問題。 – 2012-03-01 00:37:58

+0

事實證明,這很可能是問題所在。 'charset'只在'char','varchar'和'text'列有效。 – 2012-03-01 00:40:30

+0

這是問題所在。非常感謝你 – 2012-03-01 00:46:55

相關問題