GROUP_CONCAT
SELECT DISTINCT student_age FROM student

结果:
GROUP_CONCAT
如果是:

SELECT DISTINCT student_name, student_age FROM student

结果:
GROUP_CONCAT
产生原因:它是两个字段联合起来搜索没有重复的数据

第二种:

GROUP_CONCAT
SELECT student_name ,GROUP_CONCAT(DISTINCT student_age) FROM student GROUP BY student_age

查出了两个字段都不重复的数据
GROUP_CONCAT

相关文章:

  • 2021-11-07
  • 2022-12-23
  • 2021-11-10
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2021-10-03
  • 2021-05-15
相关资源
相似解决方案