`
sillycat
  • 浏览: 2490745 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Mysql Database Event and Procedure(3)Stored Procedure

 
阅读更多
Mysql Database Event and Procedure(3)Stored Procedure

Grammar
create procedure Name()
(
[in|out|inout] variable datatype
)
begin
     mysql statements;
end;

examples:
CREATE procedure p2(p INT) SET @x = p;

CALL p2(123);

SELECT @X;

define procedure, set user variable in procedure; call procedure; select the user variable

Comments
/* this is comments
   across multiple lines
*/
- - single line comments

This blog can be used as reference for grammar
https://yq.aliyun.com/articles/20804

References:
http://www.jianshu.com/p/1cb06d5eda09
https://yq.aliyun.com/articles/20804
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics