MySQL使用小技巧

  1. group_concat()  -- 将group by产生的同一个分组中的值连接起来,返回一个字符串结果(可以添加distinct去重)。
  2. substring_index(被截取字段,关键字,关键字出现的次数)-- 截取字段
  3. "小明" as name 
原文地址:https://www.cnblogs.com/aaronthon/p/10841078.html