我的表结构是:
id | type | attribute | customer_id | value
1 | 2 | 1 | 1 | some
2 | 2 | 2 | 1 | this
3 | 2 | 3 | 1 | that
4 | 2 | 1 | 2 | cool
5 | 2 | 2 | 2 | just
ETC
我想将value ='mine' 作为属性4 添加到每个customer_id。
INSERT INTO mytable
SET type='2', attribute='4, value='mine'
问题是如何将它绑定在 customer_id 上并且每个客户只绑定一次?