2019年3月15日13:25:23
一个student表有4个字段,student_id,class,name,age. 用sql语句查找出class,name,age都相同的student_id
答案:
SELECT GROUP_CONCAT(id),name,age,class FROM `students` GROUP BY name,age,class having count(id)>1;
2019年3月15日13:25:23
一个student表有4个字段,student_id,class,name,age. 用sql语句查找出class,name,age都相同的student_id
答案:
SELECT GROUP_CONCAT(id),name,age,class FROM `students` GROUP BY name,age,class having count(id)>1;