提问者:小点点

MySQL-运行INSERT INTO查询时出现问题


有人能告诉我在这个insert语句上我做错了什么吗:

INSERT INTO inventory (typer, prodid, Description, Loc, Price, Total, Available) 
Values('Head', 'H001', 'KosMom - Blue', 'G:\Tesd\', '48.00', 5, 5);


inventory table:
uid - int - key
typer - varchar 255
prodid - varchar 255
Description - varchar 255
Loc - text
Price - text
Total - int
Available - int

运行查询时出错:

INSERT INTO inventory (typer, prodid, Description, Loc, Price, Total, Available) 
Values('Head', 'H001', 'KosMom - Blue', 'G:\Tesd\', '48.00', 5, 5);
> 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 
'48.00', 5, 5)' at line 2
> Time: 0s

共1个答案

匿名用户

反斜杠是转义字符。 尝试将它们加倍:

Values('Head', 'H001', 'KosMom - Blue', 'G:\\Tesd\\', '48.00', 5, 5);