check the manual that corresponds to your MySQL server version for the right syntax to use near


一、問題

mysql插入數據時報錯

sql如下

insert into t_sysconfig (servercode,key,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer時從recommend表查到數據的最小數,小於這個數時從callback表補",NOW())

二、原因及解決辦法

  • 原因:關鍵字key問題

  • 解決辦法:在關鍵字前后加上符號`就好了

修正后的sql:

insert into t_sysconfig (servercode,`key`,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer時從recommend表查到數據的最小數,小於這個數時從callback表補",NOW())

執行結果:

insert into t_sysconfig (servercode,`key`,value,remark,updatetime) values ("com","min.recommend.count","5","新增offer時從recommend表查到數據的最小數,小於這個數時從callback表補",NOW())
Affected rows: 1
時間: 0.203s


免責聲明!

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



猜您在找 check the manual that corresponds to your MySQL server version for the right syntax to use near '(0) NULL DEFAULT NULL COMMENT check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc check the manual that corresponds to your MySQL server version for the right syntax to use near 'Order (moneys, orderNumber) values (0.0, 'A001' 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 【異常】MySQL建表報錯: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"' at line 1 修改mysql密碼報錯: 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' 報錯--->java.sql.SQLSyntaxErrorException: 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 'delect from testd 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 check the manual that corresponds to your MySQL server version for the right syntax錯誤
 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM