`

oracle 同一表中父类关联子类

阅读更多
select * from IAPS_BRANCH where
PARENT_BRANCH_ID='$branchId$'
order by BRANCH_ID


-- 通过父类查找对应的所有子类 
select branch_id from iaps_branch where
branch_id!='$parentBranchId$' start with branch_id =
'$parentBranchId$' connect by prior branch_id = parent_branch_id
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics