MySQL存储过程一
时间:2008-12-15 来源:hkebao
1.基本语法:
create procedure sp_name()
begin
………
end
if 条件 then
statement
else
statement
end if;
[label:] WHILE expression DO

statements

END WHILE [label] ;
(2).loop循环
[label:] LOOP

statements

END LOOP [label];
(3).repeat until循环
[label:] REPEAT

statements

UNTIL expression

END REPEAT [label] ;
begin
………
end
请注意了:这里的语句啊,是要有分号结束符号的哦!否则就会郁闷一上午的哦!
1.基本语法:call sp_name()
drop procedure sp_name//
2.条件语句





3.循环语句
(1).while循环











(3).repeat until循环







相关阅读 更多 +