//http://oradbhome.itpub.net/post/14580/98246
//http://www.psoug.org/reference/connectby.html
SQL> select * from usr;
NAME
----------
张三
李四
王五
已选择3行。
已用时间: 00: 00: 00.00
08:45:57 SQL> Select Substr(Sys_Connect_By_Path(Name, ','), 2)
08:46:51 2 From (Select Rownum Rid, Rownum + 1 Next_Rid, Name From Usr)
08:46:51 3 Where Rid = (Select Count(*) From Usr)
08:46:51 4 Start With Rid = 1
08:46:51 5 Connect By Prior Next_Rid = Rid;
SUBSTR(SYS_CONNECT_BY_PATH(NAME,','),2)
----------------------------------------------------------------------------
张三,李四,王五
已选择 1 行。
posted on 2007-07-12 11:47
桂湖山 阅读(771)
评论(1) 编辑 收藏 引用 所属分类:
oracle_plsql