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)
posted @ 2018-08-10 09:40  __Ant  阅读(2393)  评论(0编辑  收藏  举报