ERROR 1064 (HY000): ReplaceStatement can't be supported,use insert into ...on duplicate key update..

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/webnum/article/details/80404764

使用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);



猜你喜欢

转载自blog.csdn.net/webnum/article/details/80404764