ON DUPLICATE KEY UPDATE :有则更新覆盖,没有则新增
INSERT INTO tp_user_count ( mobile, apply_sum, refuse_sum, over_sum, loan_sum, three_sum, seven_sum, one_month_sum) VALUES ( 18555004307, 1, 1, 1, 1, 1, 1, 1), ( 185550043071, 1, 1, 1, 1, 1, 1, 1), ( 185550043072, 1, 1, 1, 1, 1, 1, 1), ( 185550043073, 1, 1, 1, 1, 1, 1, 1), ( 185550043074, 1, 1, 1, 1, 1, 1, 1), ( 185550043075, 1, 1, 1, 1, 1, 1, 1), ( 185550043076, 1, 1, 1, 1, 1, 1, 1) ON DUPLICATE KEY UPDATE apply_sum = apply_sum + VALUES ( apply_sum ), refuse_sum = refuse_sum + VALUES ( refuse_sum ), over_sum = over_sum + VALUES ( over_sum ), loan_sum = loan_sum + VALUES ( loan_sum ), three_sum = three_sum + VALUES ( three_sum ), seven_sum = seven_sum + VALUES ( seven_sum ), one_month_sum = one_month_sum + VALUES ( one_month_sum );
本文为Jsky原创文章,转载无需和我联系,但请注明来自Jsky博客 www.tjin.link