2019-07-10
阅读量:
2766
查询“001”课程比“002”课程成绩高的所有学生的学号
Student(S#,Sname,Sage,Ssex)学生表
S#:学号
Sname:学生姓名
Sage:学生年龄
Ssex:学生性别
Course(C#,Cname,T#)课程表
C#:课程编号
Cname:课程名称
T#:教师编号
SC(S#,C#,score)成绩表
S#:学号
C#:课程编号
score:成绩
Teacher(T#,Tname)教师表
T#:教师编号:
Tname:教师名字
select a.S# from (select S#,score from SC where C#='001')a, (select s#,score from SC where c#='002')b Where a.score>b.score and a.s# = b.s#;






评论(0)


暂无数据