sql 统计人数
SQL查询,在student表中有字段名为subject,name,stu_id,birthday,address,class,memo,请查询所有subject为英语,政治,数学,计算机,C语言编程的学生并统计出人数!
其他答案
select count(stu_id) from student where subject in{‘英语’,‘政治’,‘数学’,‘计算机’,‘C语言编程'}上述SQL语句为查询科目为这五门课的学生总数,如果用count(*),可能没有剔除重复记录,所以用count(stu_id)select subject, count(stu_id) from student where subject i 展开
2010-10-30 01:48
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




