有一个部门表(T_Department):
T_Department:
ID :varchar2(25)
Name:varchar2(100)
SuperiorID:varchar2(25)
SuperiorName:varchar2(100)
Remark:varchar2(1000)
根据一个部门的ID,获取该部门下所有的子部门,例如部门的ID为“D”:
select * from T_Department
Start with ID='D'
Connect by prior ID=SuperiorID