sql语句查询老师学生记录大于1的条数

这是teacher表结构,查询每一个老师student这个字段存在数据库的记录数,过滤出大于2的记录sql 1.数据库 这个就过滤出了,存在student记录数大于1的老师名与记录条数code SELECT `name`,COUNT(student) FROM teacher   GROUP BY `name` HAVING COUNT(student)>1 blog 结果class 修改为2se
相关文章
相关标签/搜索