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 'grou
阿新 • • 發佈:2018-12-07
mysql8.0版本
在已存在的表裡插入一條資料
insert INTO api_user(id,username,email,groups)VALUES('1','hh','[email protected]','Boss');
執行報錯: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 'groups)VALUES('1','hh','[email protected]
語句檢查實在是沒有看到問題,網上也搜尋了很多查看了mysql的預設引擎innodb也是使用中的
一直提示near 'groups)VALUES('1','hh','[email protected]','Boss')' 檢視是不是groups和mysql的保留字元衝突了,標註一下再次測試成功
修改為:insert INTO api_user(id,username,email,`groups`)VALUES('1','hh','[email protected]','Boss');備註:數字1鍵旁邊的~鍵
執行結果:
[SQL]insert INTO api_user(id,username,email,`groups`)VALUES('1','hh',' [email protected]','Boss');
受影響的行: 1
時間: 0.184s
mysql保留字元表:
|