很实用的语法,父子节点通过id与patientId来关联,知道子节点的id,想查出所有的父节点:
START WITH ...
CONNECT BY ...
SELECT T2.ORG_FULLNAME FROM SYS_ORG T LEFT JOIN SYS_ORG_MULTILANG T2 ON T2.ORG_ID = T.ORG_ID AND T2.DICT_LANG_TYPE = 'en' START WITH T.ORG_ID = '101230' CONNECT BY PRIOR T.ORG_PARENT_ID = T.ORG_ID