mysql> create database yy;
Query OK, 1 row affected (0.00 sec)
mysql> use yy;
Database changed
mysql> set @num1=10,@num2=20,@num3=30; //设置全局变量
mysql> delimiter $$
mysql> create procedure p(in num1 int,out num2 int,inout num3 int)
-> begin
-> select num1,num2,num3;
-> set num1=100,num2=200,num3=300;
-> select num1,num2,num3;
-> end $$
Query OK, 0 rows affected (0.00 sec)
mysql> delimiter ;
mysql> call p(@num1,@num2,@num3);
到此这篇关于MySQL存储过程in、out和inout参数示例和总结的文章就介绍到这了,更多相关MySQL存储过程in、out和inout参数内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!