mysql或oracle合并行函数

2013-07-11

mysql有group_concat函数,oracle有wm_concat函数。

mysql
select ID,group_concat(NAME) as NAME from table group by ID;
select ID,group_concat(NAME SEPARATOR ';') as NAME from a group by ID;

oracle
select CID,wm_concat(NAME) as name from visitor_info where cid > 50000 group by CID;

分类:数据库 | 标签: |

相关日志

评论被关闭!