group_concat

SELECT a.id,CAST(GROUP_CONCAT(b.status) AS CHAR) status from letter_innermail a LEFT JOIN letter_imail_status b on a.id=b.innermail_id GROUP BY a.id
原文地址:https://www.cnblogs.com/songbird/p/7600776.html