1. 程式人生 > >Mysql列轉行

Mysql列轉行

SELECT rowid,GROUP_CONCAT(labelname ORDER BY labelname SEPARATOR   ", ") AS re_name  FROM recordLabel GROUP BY groupid;