1.查询所有课程的课程编号、课程名和学分。
select courseno,cname,credit from course
2.查询160501班所有学生的基本信息。
命令:select * from student where classno=160501
3.查询STUDENT表中所有年龄大于20岁的男生的姓名和年龄。
select sname,DATEDIFF(year,birthday,GETDATE()) as '年龄' from student
4.查询计算机学院教师的专业名称。
select major from teacher where department='计算机学院'
5.查询选修了课程且期末成绩不为空的学生人数。
select (select COUNT(final) from score )
6.查询所有Email使用126邮箱的学生的学号、姓名和电子邮箱地址。
<