select company_id, name, location, industry, scale, del_flag, create_by, create_time, update_by, update_time, remark,code,description,nature,total_recruitment from company INSERT INTO company ( name, location, industry, scale, code, description, nature, create_by, create_time, del_flag ) VALUES ( #{company.name}, #{company.location}, #{company.industry}, #{company.scale}, #{company.code}, #{company.description}, #{company.nature}, #{company.createBy}, #{company.createTime}, #{company.delFlag} ) UPDATE company c SET TOTAL_RECRUITMENT = ( SELECT COUNT(*) FROM job j WHERE j.company_id = c.company_id );