mysql将多条结果拼接成一条结果
1,实际数据
SELECT resource_id, resource_type FROM res_resource_mount
2,拼接之后数据
SELECT
c.resource_id,
GROUP_CONCAT(c.resource_type)
FROM
(
SELECT
resource_id,
resource_type
FROM
res_resource_mount
) c
GROUP BY
c.resource_id