没有数据库先执行50q数据库
- 查询选修某课程的同学人数多于5人的教师姓名
Select cno from score group by cno having count(*)>5;
Select tname from teacher as t inner join course as c on t.tno=c.tno where cno in(Select cno from score group by cno having count(*)>5); - 查询95033班和95031班全体学生的记录
select * from student where class='95033' or '95031'; - 查询出“计算机系“教师所教课程的成绩表
Select score.*from teacher as inner join course as con t.tno=c.cno inner join score as con c,cno=s.scno - 查询选修编号为“3-105“课程且成绩至少高于选修编号为“3-245”的同学的Cno、Sno和Degree,并按Degree从高到低次序排序。
Select degree from score where cno=’3-105’
And degree>all(Select degree from score where cno=’3-245’) - 查询所有姓李的同学的sno,sname,cno,degree
Select s.sno,sname,cno,degree from student as s inner join score as c no s.sno=c.sno where sname like ‘李%

最低0.47元/天 解锁文章
5638

被折叠的 条评论
为什么被折叠?



