Mysql 重要函数 Group_concat、 if 、 concat 等等

 Group_concat

https://blog.csdn.net/qq_35531549/article/details/90383022

if 

if(a==1,‘男’,‘女’)

 

concat 

https://blog.csdn.net/weixin_40803257/article/details/81737047



SELECT DISTINCT(ACTIVITYDEFID),ID,ROLENAME,ACTIVITYDEFTYPE,ACTIVITYDEFNAME,GROUP_CONCAT(IF(USERPATH!='', CONCAT(USERPATH,';'),'') SEPARATOR '') USERPATH FROM BO_ACT_RAM_AUTHTPL_GROUP_R_L WHERE 1=1 GROUP BY ACTIVITYDEFID ORDER BY ORDERINDEX ASC
posted @ 2020-04-17 09:34  R_Oasis  阅读(1019)  评论(0编辑  收藏  举报