mysql列合并

2016-02-16 19:08:09来源:CSDN作者:wwwcomcn123人点击

SELECT *,GROUP_CONCAT(qy.qy_name SEPARATOR ';') AS NAME 
FROM ydyl_xdxx xdxx INNER JOIN ydyl_qy qy ON(xdxx.xd_id=qy.qy_xd_id) 
WHERE qy.qy_statu=1 GROUP BY xd_ssidtype
关键字:
1.GROUP_CONCAT
2.GROUP BY
   

微信扫一扫

第七城市微信公众平台