以ä¸ã®ãããªãã¼ãã«ãããã¨ãã¾ãã Aãã¼ãã« ï¼¢ãã¼ã㫠以ä¸ã®ãããªSQLãæµãã¨ã SELECT A.id, GROUP_CONCAT(B.bname) as namae FROM A, B WHERE A.id = B.aid GROUP BY A.id ãããªé¢¨ã«ãã¾ã¨ãã¦ããã¾ããã ãã®ã»ãã以ä¸ã®ãããªãã¨ãã§ãã¾ãã æé ã»éé ã«ä¸¦ã¹ã¦ããã GROUP_CONCAT(B.bname order by B.id) éè¤ããååãã¾ã¨ãã¦ããã GROUP_CONCAT(distinct(B.bname)) åºåãæåæå®ãã§ãã GROUP_CONCAT(B.bname separator '/') åè ã» MySQLã®ç¬èªã®é¢æ°ãªã®ã§ãä»ã®ãã¼ã¿ãã¼ã¹ã使ãå ´åã¯è¦æ¤è¨ï¼Oracleã ã¨wmsys.wm_concatããããªã©ï¼ã ã» NULLãå«ãå ´å注æã ãã®
{{#tags}}- {{label}}
{{/tags}}