select a.ep_classes 类型, GROUP_CONCAT(a.ep_name SEPARATOR ' : ') 姓名2 from Table_A a3 group by a.ep_classes
一个字段可能对应多条数据,用mysql实现将多行数据合并成一行数据
效果