Mysql group_concat

时间:2023-03-09 03:40:19
Mysql group_concat
select p.id,p.parent_id,group_concat(distinct(CONCAT("分类名称:",c.name))  order by c.id desc separator " || ") as remark from picture as p left join category as c on c.parent_id = p.parent_id group by p.parent_id;