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