mysql 更新存在就累加,不存在就插入语法

INSERT INTO tb_http_tomcat_monitor_1 (id,total_res_time,total_req_count,req_dispose_count,queue_size,thread_pool_size,excute_thread_count,wait_thread_count)
VALUES('20180810093055',20,1,2,1,20,2,1) ON DUPLICATE KEY UPDATE total_res_time=total_res_time+VALUES(total_res_time),total_req_count=total_req_count+VALUES(total_req_count)
原文地址:https://www.cnblogs.com/yangyang2018/p/9453108.html