1.多字段去重

sql示例

select substring_index(subString_index(a.column,’,’,b.help_topic_id+1),’,’,-1) as column
from
(select subString(GROUP_CONCAT(t.column),34) as code from table t group by t.column1, t.column2
having count(t.column1) > 1) as a
join mysql.help_topic as b
on b.help_topic_id < (char_length(a.code) - char_length(replace(a.code,’,’,’’))+1)

GROUP_CONCAT:
1、功能:将group by产生的同一个分组中的值连接起来,返回一个字符串结果。
2、语法:group_concat( [distinct] 要连接的字段 [order by 排序字段 asc/desc ] [separator ‘分隔符’] )