Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL Unisci due tabelle con valori separati da virgole

SELECT  a.nid,
        GROUP_CONCAT(b.name ORDER BY b.id) DepartmentName
FROM    Notes a
        INNER JOIN Positions b
            ON FIND_IN_SET(b.id, a.forDepts) > 0
GROUP   BY a.nid