当前位置:Gxlcms > mysql > mysql存储过程输入输出参数示例

mysql存储过程输入输出参数示例

时间:2021-07-01 10:21:17 帮助过:5人阅读

drop PROCEDURE if exists my_procedure; create PROCEDURE my_procedure(in my_id int,out my_name char) BEGIN select list_name into my_name from aa_list where list_id=my_id; end; call my_procedure(24,@a); select @a;

drop PROCEDURE if exists my_procedure; 
create PROCEDURE my_procedure(in my_id int,out my_name char) 
BEGIN  
 select list_name into my_name from aa_list where list_id=my_id; 
end; 
call my_procedure(24,@a); 
select @a;

人气教程排行