在oracle中,当要查询一个树形列表时,可以采用树查询: SELECT * FROM tablename START WITH ID = IDNUM CONNECT BY PRIOR parentID= ID;