12、查询“计算机系”与“电子工程系” 中不同职称的教师tname和prof select tname,prof from teacher a where prof not in(select prof from teacher b where a.depart!=b.depart) 13、查询和学号为107的同学同年出生的所有学生的Sno、Sname和Sbirthday列 select sno,sname,sbirthday from student where year(sbirthday) =(select year(sbirthday) from student where sno='107') 14、查询出“计算机系“教师所教课程的成绩表 select score.sno,score.cno,score.degree from teacher inner join course on teacher.tno = course.tno inner join score on course.cno = score.cno where teacher.depart = '计算机系' 或者: select sno,Cno ,Degree from Score where Cno in (select Cno from Course where Tno in (select tno from Teacher where Depart='计算机系')) |
|