use db insert into t1 values(1, 'test'), (1, 'bar') on duplicate key update test=values(test);