表结构如下:
Id Parent_id Name
1        A
2 1        B
3 2        C
4 2        D
5 4        E
6 3        F
7 1        G输出如下:
1-------A
2-------B
3-------C
6-------F
4-------D
5-------E
        7-------G
本人写了一个存储过程(ORACLE)
create or replace procedure p(v_pid tree.pid%type) is
  cursor c is select * from tree where pid = v_pid;
begin
   for v_tree in c loop
dbms_output.put_line(v_article.name)
p(v_tree.id);
   end loop;
end;有错误  
请大家帮帮我  写一个  谢谢