使用insert into on duplicte key update,语法类似于下面INSERT INTO t (t.c1, t.c2, t.c3) VALUES ('v1','v2','v3') ON DUPLICATE KEY UPDATE t.c3 = 'v3';