SQL语言进行简单查询

上传:november48508 浏览: 11 推荐: 0 文件:docx 大小:22.63KB 上传时间:2023-01-03 10:43:01 版权申诉
1查询选修了课程的学生人数.select count distinct sno学生人数distinct表示去掉重复行from sc2查询学生200515001选修课程的总学分数.select sum credit from course sc where sno200515001and sc.cno course.cno and grade60成绩超过60才有学分并连接两个表3查所有有成绩的学生学号和课程号.select sno cno from scwhere grade is not null排除空值4查询年龄在2023岁包括20岁和23岁之间的学生的姓名系别和年龄.select sname sdept sage from student where sage20and sage23范围条件语句也可以用between and5查询选修了3号课程的学生的学号及其成绩查询结果按分数降序排列.select sno grade from scwhere cno3o

SQL语言进行简单查询

上传资源
用户评论