Oracle数据库作业-6 29、查询选修编号为“3-105“课程且成绩至少高于选修编号为“3-245”的同学的Cno、Sno和Degree,并按Degree从高到低次序排序。 select tname,prof from teacher where depart = '计算机系' and prof not in ( select prof from teacher where depart 。

时间:2023-03-08 17:31:52

29、查询选修编号为“3-105“课程且成绩至少高于选修编号为“3-245”的同学的Cno、Sno和Degree,并按Degree从高到低次序排序。

select tname,prof from teacher where depart = '计算机系' and prof not in  (

select prof from teacher where depart = '电子工程系')

30、查询选修编号为“3-105”且成绩高于选修编号为“3-245”课程的同学的Cno、Sno和Degree.

select * from score a where  cno = '3-105' and a.degree>(

select b.degree from score b where cno = '3-245'and a.sno=b.sno)