1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
create or replace procedure [procedure_name](in [param_name_1] varchar(10), out [param_name_2] varchar(5)) begin
declare [variable_name_1] char(5) default '00000' declare [variable_name_2] int default 0
declare exit handler for sqlexception, sqlwarning p1: begin set [variable] = [value]; rollback; end
[变量赋值] [执行 SQL 语句]
end
|