mysql 插入更新用法

INSERT INTO xxx_supplier_contacts ( code, name, supplier_id, user_name, mobile, email, dmall_company_id ) VALUES ( #{code}, #{name}, #{supplierId}, #{userName}, #{mobile}, #{email}, #{dmallCompanyId} ) ON DUPLICATE KEY UPDATE name = #{name}, user_name = #{userName}, mobile = #{mobile}, email = #{email}, dmall_company_id = #{dmallCompanyId}, modified = now(), yn = 1 select last_insert_id() as ID from xxx_supplier_contacts limit 1
原文地址:https://www.cnblogs.com/yzm2008/p/11075571.html