----------上机3 Not In 关键字
----使用not in 关键字的子查询来查询为参加‘’ 的课程最近一次考试的再读学生名单
select studentname from student as stu,result as res where stu.StudentNo=res.StudentNo and
examdate not in (select max(examdate) from result
where subjectid=(select subjectid from subject where subjectname='基于.NET平台的软件系统分层开发') )
---上机4--------有错误_返回多个语句 用in(可以了)
if exists (select gradename from grade where gradeID in(select gradeid from student where gradeid=1))
begin
update student set gradeid=2 where gradeID in(select gradeid from student where gradeid=1)
end
第四章上机
最新推荐文章于 2021-01-28 03:20:23 发布