摘要:
--获取当前及以下部门Create proc GetCurrentAndUnderOrg@orgId intasbegin WITH cte AS ( SELECT * ,0 AS level FROM Static_Organ WHERE OrganID=@orgId UNION ALL SELECT g.*,level+1 FROM Static_Organ g INNER JOIN cte ON g.ParentOrgan=cte.OrganID ) SELECT * FROM cteend编辑器加载中... 阅读全文