Oracle自定义聚集函数(3)
SQL> SELECT id,f_concatenate_str(name) name FROM test GROUP BY id;
ID NAME
---------- ------------------------------------------------------------------
1 AAA,ABC,
2 BBB,DDD,
3 CCC,
SQL> SELECT id,wmsys.wm_concat(name) name FROM test GROUP BY id;
ID NAME
---------- ------------------------------------------------------------------
1 AAA,ABC
2 BBB,DDD
3 CCC
SQL> SELECT id,f_concatenate_str(name) OVER (PARTITION BY id) name FROM test;
ID NAME
---------- ------------------------------------------------------------------
1 AAA,ABC,
1 AAA,ABC,
2 DDD,BBB,
2 DDD,BBB,
3 CCC,
SQL> SELECT id,wmsys.wm_concat(name) OVER (PARTITION BY id) name FROM te
相关新闻>>
- 发表评论
-
- 最新评论 更多>>