`
fjfj910
  • 浏览: 88507 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Oracle-使用wmsys.wm_concat把行转换成合并列

阅读更多

wmsys.wm_concat //数据库内部函数:把多行转换成一合并列

例如:

  1. select b.fchannel_id from sinocms_bindle_channel b where b.channel_id='1000000027'   

结果:

1 1000000029

2 1000000030

3 1000000031

4 1000000032

5 1000000033

6 1000000034

 

 把多行转换成一合并列

  1. select wmsys.wm_concat(b.fchannel_id) from sinocms_bindle_channel b where b.channel_id='1000000027'  

 结果:1000000029,1000000030,1000000031,1000000032,1000000033,1000000034

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics