navicat for mysql 执行sql报错,只因有分号和井号
程序员文章站
2022-06-15 19:22:56
...
环境:Navicat Premium 11.1, Mysql 数据库
sql语句:
错误信息:
[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 ''
#' at line 3
结论:
在cmd命令下没有问题, params列的值中 "#",";" 放一起就不会出现问题,或者#不在行首, 应该属于软件的问题
sql语句:
insert into `services_log`(`id`,`autorkey`,`remote_addr`,`service_name`,`params`,`create_date`,`remarks`) values ('003b5b29ad924a7b92a4344e4d3c5','248ecc19d9db4c9087a0556ec57b0','/183.146.254.29:53040|838','shtmp-check-socket', ' # ;','2016-01-23 07:22:25',null)
错误信息:
引用
[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 ''
#' at line 3
结论:
在cmd命令下没有问题, params列的值中 "#",";" 放一起就不会出现问题,或者#不在行首, 应该属于软件的问题