创建和调用
delimiter //
例子1
create procedure p1()
begin
update student
set sage = 18
where sno = ‘0001’;
end//
call p1()//
例子2
create procedure p2(in sid char(4))
begin
update student
set sage = 18
where sno = sid;
end//
call p2(‘0002’)//
例子3
create procedure p3(in sid char(4),in nl int)
begin
update student
set sage = nl
where sno = sid;
end//
call p3(‘0001’,20)//