select aidadepartmentnamebDep_duty from hrmdepartment a left join uf_Dep_duty_dt2 b on aid=bDep_name WHERE LENGTHadepartmentcode = 16 and acanceled=0 or acanceled is null order by bid desc 如果 LENGTH
SELECT a.id, a.departmentname, b.Dep_duty FROM hrmdepartment a LEFT JOIN uf_Dep_duty_dt2 b ON a.id = b.Dep_name WHERE (LENGTH(a.departmentcode) = 16 OR LENGTH(a.departmentcode) = 13) AND (a.canceled = 0 OR a.canceled IS NULL) ORDER BY b.id DESC
原文地址: https://www.cveoy.top/t/topic/iD4P 著作权归作者所有。请勿转载和采集!