mySQL字段中包含关键字的插入问题

tb_system_help2中包含关键字字段order 插入时会报错。

INSERT INTO tb_system_help2(sysid,sysname,helpid,helpname,parentid,isLeaf,order) VALUES(?,?,?,?,?,?,?)

 解决办法:

INSERT INTO tb_system_help2(sysid,sysname,helpid,helpname,parentid,isLeaf,`order`) VALUES(?,?,?,?,?,?,?)

 

改成 `order` ,注意是数字键1旁边的反引号`  (选用英文输入法),而 不是'  单引号

猜你喜欢

转载自it4j.iteye.com/blog/2012330
今日推荐