当前位置 : 主页 > 数据库 > mysql >

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

来源:互联网 收集:自由互联 发布时间:2021-07-07
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;
网友评论