共回答了20个问题采纳率:95%
1
create view V_StudInfo
as
select a.学 ,a.姓名,b.课程 ,b.课程名,
case when c.成绩 between 90 and 100 then ‘优’
when c.成绩 between 80 and 89 then ‘良’
when c.成绩 between 70 and 79 then ‘中’
when c.成绩 between 60 and 69 then ‘及格’
else ‘不及格’ end 成绩等级
from 学生表 a,课程表 b, 成绩表 c where a.学 =c.学
and b.课程 =c.课程
2
create view V_Stud
as
select a.学 ,a.姓名,count(*) 所修科目数,avg(成绩) 平均成绩
from 学生表 a,课程表 b, 成绩表 c where a.学 =c.学
and b.课程 =c.课程
and a.学 in
(select a.学
from 学生表 a,课程表 b, 成绩表 c where a.学 =c.学
and b.课程 =c.课程 and b.课程名=’英语’ and c.成绩>75) 表名和字段名,自己跟你实际的核对一下,不同的改一下
1年前
4
相关资源:孤狼电脑易用快捷助手V1.0免费绿色版-其它代码类资源-CSDN文库
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!