MySQL和MyCat replace
MySQL 支持 replace into
例子:REPLACE INTO `st_controlmodule` (id,cname,cip,cport,cdesc,cstate) VALUES ('1281029966208831488','3.79安防通用模型_YB测试B03','192.168.3.79','10027','3.79安防通用模型_YB测试003','2');
但是MyCat不支持
用ON DUPLICATE KEY UPDATE 非主键colunm=VALUES(非主键colunm);
INSERT INTO `st_system_dict` (id,name,fid,tier) VALUES ('1116256180692475001', '油色谱4', '1116256180692475000', '2') ON DUPLICATE KEY UPDATE name=VALUES(name),fid=VALUES(fid),tier=VALUES(tier);