-- 示例:更新指定部门员工的工资上涨20%
drop procedure if exists test;
delimiter $$
create procedure test( in temp_deptno int(10) )
begin
select ename , deptno , sal from emp ;
update emp set sal = sal * 1.2 where deptno = temp_deptno ;
select ename , deptno , sal from emp ;
end $$
select *from emp ;
call test( 1002 );