select A.HOSPITAL_ID from T_HOSPITAL A connect by prior A.HOSPITAL_ID=A.PARENT_ID start with A.HOSPITAL_ID=1
select A.* from T_HOSPITAL A start with A.HOSPITAL_ID=9 connect by prior A.PARENT_ID=A.HOSPITAL_ID
一个是读取所有父标签,一个是读取所有子标签
字段里面只有parentId
2024-01-14 13:12:34
select A.HOSPITAL_ID from T_HOSPITAL A connect by prior A.HOSPITAL_ID=A.PARENT_ID start with A.HOSPITAL_ID=1
select A.* from T_HOSPITAL A start with A.HOSPITAL_ID=9 connect by prior A.PARENT_ID=A.HOSPITAL_ID
一个是读取所有父标签,一个是读取所有子标签
字段里面只有parentId