格式: SELECT column FROM table_name START WITH column=value CONNECT BY PRIOR 父主键=子外键 select lpad(‘ ‘,4*(level-1))||name name,job,id,super from emp start with super is null connect by prior id=super 例子: 原始数据:select no,q from a_example2 NO NAME ———- —————————— 001 a01 001 a02 001 a03 001 a04 001 a05 002