Oracle数据库作业-6 查询“张旭“教师任课的学生成绩。

23、查询“张旭“教师任课的学生成绩。

select * from score s where cno in (

select cno from course where tno in(

select tno from teacher where tname = '张旭'))

 

24、查询选修某课程的同学人数多于5人的教师姓名。

select tname from teacher where tno in (

select tno from course where cno in (

select cno from score group by cno having count(sno)>5))

 

25、查询95033班和95031班全体学生的记录。

select * from student s where sclass in (

select sclass from student group by sclass having sclass in( '95033' ,'95031') )

 

26、  查询存在有85分以上成绩的课程Cno.

select cno from score where degree>85

 

27、查询出“计算机系“教师所教课程的成绩表。

select * from score where cno in (

select cno from course where tno in (

select tno from teacher where depart ='计算机系'))

 

转载于:https://www.cnblogs.com/wangguoning/p/5967527.html

你可能感兴趣的:(Oracle数据库作业-6 查询“张旭“教师任课的学生成绩。)