使用mycat中用 replace的sql时会报错
ERROR 1064 (HY000): ReplaceStatement can't be supported,use insert into ...on duplicate key update... instead
用sql代替:insert into test(id,name,age) values(1,'a',20) ON DUPLICATE KEY UPDATE name=VALUES(name),age=VALUES(age);
批量更新:
insert into test(id,name,age) values(1,'a',20),(2,'b',30) ON DUPLICATE KEY UPDATE name=VALUES(name),age=VALUES(age);