创建存储过程;
DELIMITER // CREATE PROCEDURE GetAllProducts() BEGIN SELECT * FROM products; END // DELIMITER ;
删除存储过程;
drop PROCEDURE GetAllProducts;
查看存储过程:
show procedure status;
delimiter $$ create procedure pro( v_id int,in v_name varchar(20)) begin insert into student(id,name) VALUES(v_id,v_name); end$$ delimiter ;
调用:
call pro(19,"猪八戒");