使用GROUP_CONCAT合并列,使用distinct会去掉列里面重复的数据
SELECT GROUP_CONCAT(distinct main.relator_name SEPARATOR ';') AS relator_name, GROUP_CONCAT(distinct main.law_investigation_situ SEPARATOR ';') AS law_investigation_situ,main.relator_type, main.asset_id from amc.
未使用distinct效果图
使用后distinct效果图