解决:[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