mysql group_concat

来源:互联网 发布:手机通讯软件下载 编辑:程序博客网 时间:2024/06/05 07:37

group_concat合并行,例如把year字段的值打印在一行,逗号分隔。


select * from sales


select  *, (select group_concat(year separator ',') from sales where year>'2012') as years_temp from sales;



0 0
原创粉丝点击