您的位置:首页 > 其它

存储过程,in参数(存储过程也可以定义客户端变量)

2012-08-20 09:28 316 查看
drop procedure if exists p5;

delimiter //

create procedure p5(p int)
set @x = p//
-- 定义客户端变量,p的值赋给它

delimiter ;

call p5(100);

select @x;

/*
+------+
| @x   |
+------+
|  100 |
+------+
*/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐