解決:[Err] 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


  在mysql執行插入數據的操作時報錯:[Err] 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 'key,enkey,content) values('1','1','1','1','1','1','石家庄')' at line 1

  我的sql語句為:insert into doclist(title,entitle,zhaiyao,enzhaiyao,key,enkey,content) values('1','1','1','1','1','1','石家庄'),看上去sql語句並沒有錯,可運行起來就是不成功。根據報錯信息我們可以了解到錯誤在key,enkey和content附近,

 

 

  key這里標藍,代表了關鍵字,普通屬性與關鍵字沖突,網上查閱資料說加什么反引號,要我說直接把key改個名就行,快速又簡單。最后將key改為keyw,運行數據插入成功。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 ERROR 1064 (42000): 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 php"> [Err] 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 ''

php MySql 執行語句錯誤 Err] 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 ERROR 1064 (42000): 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 '11. set password for 'root'@'localhost' 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 '"id", 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','hh@163.com','Boss')' at line 1 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' Django進行數據遷移時,報錯:(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 '(6) NOT NULL)' at line 1") SQL語句報錯:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 解決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 'order (order_name, customer)

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM