1.group
不能用group作爲字段名
### SQL: insert INTO biz_customer_group ( id,customer,group ) VALUES (?,?,?) ON DUPLICATE key update customer = VALUES(customer), group = VALUES(group)
### Cause: java.sql.SQLSyntaxErrorException: 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 'group
==> Preparing:
insert INTO biz_customer_group
( id,customer_id,group_id ) VALUES (?,?,?)
ON DUPLICATE key update
customer_id = VALUES(customer_id),
group_id = VALUES(group_id)
==> Parameters: 0(Long), 1(Long), 30(Long)
<== Updates: 1
文章讲述了在尝试使用SQL语句向biz_customer_group表中插入数据时遇到的错误,原因在于`group`关键字被误用,正确的语句应该使用`group_id`。同时,还提到了ONDUPLICATEKEYUPDATE语句的使用。
1060

被折叠的 条评论
为什么被折叠?



