摘要: 用hierachical query,即connect by配合dual表生成序列,mod这个是取余函数,生成group factor。最后面的connect by rownum <= 100可以替换为connect bylevel <= 100select case when mod(rownum... 阅读全文
posted @ 2015-07-05 16:49 Jerry_Chen 阅读(753) 评论(0) 推荐(0) 编辑
摘要: Oracle中的Connect By... Start With语句实现了递归查询或者树状查询。Connect By Prior 一方为起始(root)的ID参考:http://www.360doc.com/content/13/0422/16/11947209_280153192.shtmlhtt... 阅读全文
posted @ 2015-07-05 16:41 Jerry_Chen 阅读(228) 评论(0) 推荐(0) 编辑