create procedure 存储过程名字() MySQL 语句
创建
create procedure all_customers() select* from customer
create procedure insert_customers(in myname varchar(20),in myemail varchar(20)) insert into customer(name,email)values(myname,myemail)
create procedure getnameById(in cid int,out return_name varchar(20)) select name into return_name from customer where id=cid
使用查询
call all_customers()