任务描述
本关任务: 修改存储过程pro0101,并调用;
--修改sel_course表中成绩<60的记录为成绩+10,然后将计算机学院所有学生的选课成绩输出;
--a、需要先删除存储过程pro0101;
drop procedure if exists pro0101;--b、然后再创建同名的存储过程pro0101;
CREATE PROCEDURE pro0101()
AS
BEGINupdate sel_course set score=score+10 where score<60;drop table if exists tmp1;CREATE TABLE tmp1(num integer,name char(20),course char(20),score integer);insert into tmp1 SELECT num,stu.name as name,c.name as course,scoreFROM student stu,course c,sel_course swhere stu.num=s.studentid and c.id=s.courseid and stu.dept='cs' order by num,course;
END
/