MySQL存储过程实例

来源:互联网 发布:小黄人接金币 源码 编辑:程序博客网 时间:2024/06/14 04:30

MySQL存储过程实例代码如下:

drop table if exists t1;create table t1(id int not null);insert into t1 values(1), (2), (3);delimiter //create procedure myfun(in para int)beginselect * from t1 where id = para;end;//delimiter ;set @a = 1;call myfun(@a);call myfun(2);


0 0