• group_concat

      1. select group_concat(user_id) from sys_user_role group by role_id

      直接使用 group_concat ,其中的字段是无序排列,如果需要有序,可以配合 order by 使用

    • group_concat(columnA order by columnB)

      1. select group_concat(user_id order by user_id desc) from sys_user_role group by role_id