编程要求
1、创建第1个存储过程,并调用; 1)创建存储过程,查询emp表数据; 2)调用存储过程;
--创建存储过程,获得计算机(cs)系学生选课情况并将结果写入临时表tmp。drop procedure if exists pro0101;CREATE PROCEDURE pro0101()
AS
BEGINdrop table if exists tmp;CREATE TABLE tmp(num integer,name char(20),course char(20));insert into tmp SELECT num,stu.name as name,c.name as course FROM 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
/ CALL pro0101();