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
posted @ 2019-06-24 10:03  yizuoming  阅读(1195)  评论(0编辑  收藏  举报