数据插入时遇到的问题
在Mysql中进行数据insert操作时,出现的1064错误
错误提示为:You have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for the right syntax to user near’4’,’1’,’6’,’2252’);
Insert into hrswrun values (‘316’,’svchost.exe’,’0.0’’C:/WI’ at line
1
代码:insert into hrswrun values('216','raysat_3dsmax2010_32server.exe','0.0','D:\Program Files\Autodesk\3ds Max 2010\mentalray\satellite\','','4','1','6','2252');
insert into hrswrun values('316','svchost.exe','0.0','C:\WINDOWS\system32\','-k LocalService','4','1','9','4296');
注:出问题的这行为第三行,前句话已经顺利执行。第三句话开始报错。这段数据是从程序中直接导出的。
求解答!!!
------解决方案--------------------
'C:\WINDOWS\system32' 去掉最右边的转义符\
------解决方案--------------------mysql> create table hrswrun(a char(100),b char(100),c char(100),d char(100),e char(100),f char(100),g char(100),h char(100),i char(100)); Query OK, 0 rows affected (0.01 sec)
mysql> insert into hrswrun values('216','raysat_3dsmax2010_32server.exe','0.0','D:\Program Files\Autodesk\3ds Max 2010\mentalray\satellite\\','','4','1','6','2252');
Query OK, 1 row affected (0.00 sec)
------解决方案--------------------insert into hrswrun values('316','svchost.exe','0.0','C:\WINDOWS\system32','-k LocalService','4','1','9','4296');