首页 > 代码库 > GROUP_CONCAT将里面拼接的字符串排序

GROUP_CONCAT将里面拼接的字符串排序

SELECT oam.id , GROUP_CONCAT(oacm.name) category
FROM om_article_manage oam
LEFT JOIN om_article_category_relation oacr ON oacr.article_id = oam.id
LEFT JOIN om_article_category_manage oacm ON oacm.id = oacr.category_id
			
GROUP BY oam.id
ORDER BY oacm.name DESC

 这

GROUP_CONCAT将里面拼接的字符串排序