Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-07 16:28:51
Original
962 people have browsed it

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;
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template