http://expert.csdn.net/Expert/topic/1375/1375432.xml?temp=.8570978

解决方案 »

  1.   

    int n
    int i 
    int j=0
    select count(*) into :n form 表;
    string a[n]
    for i=0 to n-1 
        select name into :a[i] from 表 where parentid = :j
        select id into :j form 表 where  name = :a[i]
    next;
        然后安a[0]...a[n-1]显示就是了
      

  2.   

    to:
    xiawenxin(xiawenxin) 
    这个sql 语句放在
    查询分析器中显示有语法错误呀
    请问话在哪野运行呀