MYSQL 插入错误
MYSQL INSERT INTO ERROR
我不断收到错误 #1064 - 您的 SQL 语法有误;查看与您的 MySQL 服务器版本对应的手册,了解在 '."LTTA3101","1","03-JAN-07") 附近使用的正确语法,
("SK3127","LTCPF502","5","03-JAN-07")' 第 17 行
INSERT INTO sales
(cust_id,prod_id,quanitity,date_of_sale)
values
("MH3367
","DTHP7710","1","01-OCT-06"),
("GM4632","DTCP2109","4","08-OCT-06"),
("GM2581","LTTA3101","1","10-OCT-06"),
("GM4632","LTCPF502","2","28-0CT-06"),
("KM4673","LTCPC505","4","04-NOV-06"),
("MH3367","LTPBMZ36","3","22-NOV-06
"),
("KS2169","LTTA0338","4","14-DEC-06"),
("AS3485","DJHP1280","5","16-DEC-06"),
("KM4637","DJEPR180","5","18-DEC-06"),
("GM2581","A1HPF380","8","19-DEC-06"),
("GM4632","A1LX5470","9","22-DEC-06"),
("AS3485","DTHP7710","1","23-DEC-06"),
("SK3127","DTCP2109","5","24-DEC-06"),
("AS3485"."LTTA3101","1","03-JAN-07"),
("SK3127","LTCPF502","5","03-JAN-07");
有人可以帮忙吗?
谢谢..
您在查询的第 19 行使用“.”而不是逗号,当您遇到 MySQL 语法错误时,引号中提到的第一个字符通常是问题所在。
INSERT INTO sales
(cust_id,prod_id,qty,date_of_sale)
values
("MH3367","DTHP7710","1","2006-10-01"),
("GM4632","DTCP2109","4","2006-10-02"),
("GM2581","LTTA3101","1","2006-10-03"),
("GM4632","LTCPF502","2","2006-10-04"),
("KM4673","LTCPC505","4","2006-11-04"),
("MH3367","LTPBMZ36","3","2006-11-22"),
("KS2169","LTTA0338","4","2006-12-09"),
("AS3485","DJHP1280","5","2006-12-16"),
("KM4637","DJEPR180","5","2006-12-18"),
("GM2581","A1HPF380","8","2006-12-19"),
("GM4632","A1LX5470","9","2006-12-20"),
("AS3485","DTHP7710","1","2006-12-21"),
("SK3127","DTCP2109","5","2006-12-30"),
("AS3485","LTTA3101","1","2007-01-07"),
("SK3127","LTCPF502","5","2007-01-07");
我不断收到错误 #1064 - 您的 SQL 语法有误;查看与您的 MySQL 服务器版本对应的手册,了解在 '."LTTA3101","1","03-JAN-07") 附近使用的正确语法, ("SK3127","LTCPF502","5","03-JAN-07")' 第 17 行
INSERT INTO sales
(cust_id,prod_id,quanitity,date_of_sale)
values
("MH3367
","DTHP7710","1","01-OCT-06"),
("GM4632","DTCP2109","4","08-OCT-06"),
("GM2581","LTTA3101","1","10-OCT-06"),
("GM4632","LTCPF502","2","28-0CT-06"),
("KM4673","LTCPC505","4","04-NOV-06"),
("MH3367","LTPBMZ36","3","22-NOV-06
"),
("KS2169","LTTA0338","4","14-DEC-06"),
("AS3485","DJHP1280","5","16-DEC-06"),
("KM4637","DJEPR180","5","18-DEC-06"),
("GM2581","A1HPF380","8","19-DEC-06"),
("GM4632","A1LX5470","9","22-DEC-06"),
("AS3485","DTHP7710","1","23-DEC-06"),
("SK3127","DTCP2109","5","24-DEC-06"),
("AS3485"."LTTA3101","1","03-JAN-07"),
("SK3127","LTCPF502","5","03-JAN-07");
有人可以帮忙吗?
谢谢..
您在查询的第 19 行使用“.”而不是逗号,当您遇到 MySQL 语法错误时,引号中提到的第一个字符通常是问题所在。
INSERT INTO sales
(cust_id,prod_id,qty,date_of_sale)
values
("MH3367","DTHP7710","1","2006-10-01"),
("GM4632","DTCP2109","4","2006-10-02"),
("GM2581","LTTA3101","1","2006-10-03"),
("GM4632","LTCPF502","2","2006-10-04"),
("KM4673","LTCPC505","4","2006-11-04"),
("MH3367","LTPBMZ36","3","2006-11-22"),
("KS2169","LTTA0338","4","2006-12-09"),
("AS3485","DJHP1280","5","2006-12-16"),
("KM4637","DJEPR180","5","2006-12-18"),
("GM2581","A1HPF380","8","2006-12-19"),
("GM4632","A1LX5470","9","2006-12-20"),
("AS3485","DTHP7710","1","2006-12-21"),
("SK3127","DTCP2109","5","2006-12-30"),
("AS3485","LTTA3101","1","2007-01-07"),
("SK3127","LTCPF502","5","2007-01-07");