实验三 SQL 语言进行简单查询一、实验目的掌握简单数据查询操作
二、实验内容使用各种查询条件完成指定的查询操作三、实验步骤1、查询选修了课程的学生人数
select count (distinct sno)from sc;2、查询学生 202515004 选修课程的总学分数
select sum(credit)from sc,coursewhere sno='202515004’ and sc
cno=course
cno and grade〉=60;3、查所有有成绩的学生学号和课程号
select sno,cnofrom scwhere grade is not null;4、查询年龄在 20~23 岁(包括 20 岁和 23 岁)之间的学生的姓名、系别和年龄select sname,sagefrom studentwhere sage between 20 and 23;5、查询选修了 3 号课程的学生的学号及其成绩,查询结果按分数降序排列
select sno,gradefrom scwhere cno='3'order by grade desc;6、求哪些学生还没有被分配系
select sno,snamefrom studentwhere sdept is null;7、求 CS 系中所有男同学的学生姓名和年龄
select sname,sagefrom studentwhere ssex=’男' and sdept='cs’;8、我校开设的课程中哪些课程名以“数据”两个字开头
select cnamefrom coursewhere cname like'数据';9、求哪些学生的姓名中第 2 个字是“力”
select snamefrom studentwhere sname like&#