(2)、select (select 课程名 from Course c where c.课程号=s.课程号) 课程名称, s.分数 from sc s
where s.学号=(select st.学号 from Student where 姓名='张三')
(3)、select 姓名 from Student where 学号 in ( select distinct 学号 from SC where 分数>=60 )
(4)、select Avg(年龄) from Student st where st.学号 in( select sc.学号 from sc sc where sc.课程号 in (select 课程号 from Course c where 课程名='101'))
and 性别='女'
(5)、select (select 姓名 from Student st where st.学号=sc1.学号) 学生姓名,sc1.分数 from SC sc1
where sc1.分数 in (select max(分数) from sc sc where sc.课程号 in (select 课程号 from Course c where c. 任课老师='张青'))
and sc.课程号 in (select 课程号 from Course c where c. 任课老师='张青')
(6)delete from SC s where s.分数<60
(7)update SC set 分数=avg(select 分数 from sc where 课程号='203') where 学号='105' and 课程号='203'
(8)create view over80 as
select sc1.学号,(select 姓名 from Student st where st. 学号=sc1.学号) 姓名,
sc1.课程号,(select 课程名 from Course c where c. 课程号=sc1.课程号) 课程名,(select 任课老师 from Course c where c. 课程号=sc1.课程号) 任课老师,
sc1.分数
from sc sc1 where sc1.分数>80
1、select * from Student2、select * from Student where stuname like '张% '
3、select stuname as '姓名',stuno as '学号' from Student
先写出前3条,后面的有空再给你写。
1、select * from student where not exists(select * from studentcourse where studentno=student.studentno2、select * from course where not exists(select * from studentcourse where courseno=course.courseno and score<60)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)