#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 ★★ at line △△

エラー

 状態:-  閲覧数:869  投稿日:2016-01-07  更新日:2016-01-07  

エラーメッセージ


SQL構文エラー
・△△行目の★★ 近くでSQL構文でエラーが発生しています
#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 ★★ at line △△


実際に遭遇した例

 閲覧数:280 投稿日:2016-01-07 更新日:2016-01-07 

実行SQL文


CREATE TABLE `UserBlog` (id INT(11),name VARCHAR(10), address VARCHAR(255));



実際に表示されたエラーメッセージ


#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 'ï¼›' at line 1


疑問点


なぜ文字化け?
・日本語使用していないのに、文字化けしている理由が理解できない


原因判明


最後のセミコロン;が全角だった


対応


最後のセミコロン;を半角へ変更


supplied argument is not a valid MySQL result

#1067 - Invalid default value for 'id'

コメント投稿(ログインが必要)