3

我曾尝试在网站和 Microsoft 文档中到处查看,但我一直坚持运行查询以将对象插入到我的表中。我在做什么错才能得到

"字符串'cate'后面的非闭合引号"

错误?

这是查询:

INSERT INTO t_lu_Product ([product_id], [description], [isCompetition], [category], 
                          [subCategory], [brand], [type], [returnability], [capacity]) 
VALUES(200011073, '1.25L PNR CC', 1, 'Cola',
       'Cola Regular', 'Coca-Cola', 'Familiares', 'No Retornable', 1);
4

1 回答 1

6

我猜您要插入的字符串之一中有一个撇号。根据您创建查询的方式,您可以使用参数或转义撇号:

INSERT INTO t_lu_Product ( ... ) VALUES(... ,'Mother''s Cookies',1);
于 2013-07-01T19:30:06.577 回答