1.当插入列为主健或单一索引(可多列)值重复时执行update操作:
INSERT INTO `records` (`domain_id`, `name`, `TYPE`, `content`, `ttl`) VALUES
(:id, :name, :type, :content, :ttl) ON DUPLICATE KEY UPDATE `change_date` = '1';
2.重复时先删除之前数据再插入新数据:
REPLACE INTO `records` (`domain_id`, `name`, `TYPE`, `content`, `ttl`) VALUES
(:id, :name, :type, :content, :ttl);