标签:
insert into tableA(`key1`,`key2`,`F1`,`F2`...) values (‘A‘,‘AA‘,5,5,...) on duplicate key update `F1`=`F1`+values(`F1`),`F2`=`F2`+values(`F2`)....
insert
into
tableA(`key1`,`key2`,`F1`,`F2`...)
values
(
‘A‘
,
‘AA‘
,5,5,...)
on
duplicate
key
update
`F1`=`F1`+
(`F1`),`F2`=`F2`+
(`F2`)....
MySQL 数据不存在就插入 数据已存在就更新
原文地址:http://my.oschina.net/vvcumt/blog/482472