select orgid, orgname, parentorgid
from org
start with orgid= 'xx' <!-- 机构号 -->
connect by prior orgid = parentorgid <!-- 对机构赋值为父机构 进行查询关联 -->
Oracle递归查询,根据机构查询机构及下级所有机构
最新推荐文章于 2024-07-16 09:41:27 发布
select orgid, orgname, parentorgid
from org
start with orgid= 'xx' <!-- 机构号 -->
connect by prior orgid = parentorgid <!-- 对机构赋值为父机构 进行查询关联 -->