ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 78

78

原创 Linux操作系统 作者:simkyo 时间:2013-08-29 13:28:54 0 删除 编辑
                from (select ID,
                             NAME,
                             PASSWORD,
                             AGE,
                             COMPANY,
                             MOBILE,
                             BIRTHDATE,
                             rownum rn
                        from test_person));
-- 层级关系
select * from t_pour_trace t start with code = 'a01' connect by prior code = father_node;
select * from T_ANALYSE_SERVICE t start with father_node = 'a' connect by prior code = father_node;
-- level 伪列
select level,t.* from t_pour_trace t start with code = 'a01' connect by prior code = father_node order by level;
select level,t.* from T_ANALYSE_SERVICE t start with father_node = 'a' connect by prior code = father_node order by level;
-- 格式化层次化
select level,lpad(' ',4*level-1)||description from T_ANALYSE_SERVICE t start with father_node = 'a' connect by prior code = father_node ;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769556/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 77
下一篇: 79
请登录后发表评论 登录
全部评论

注册时间:2013-06-20

  • 博文量
    193
  • 访问量
    165519