procedure和function实例

来源:互联网 发布:反馈网络的作用 编辑:程序博客网 时间:2024/05/21 23:00

======procedure======

create procedure pro(in id int,out name varchar(20),out sals int)beginselect sname,sal into name,sals from stuwhere sno= id;end

======function======

create function fun(id int) returns varchar(20)begindeclare name varchar(20) default 'aaaa';select sname into name from stuwhere sno= id;return name;end


0 0
原创粉丝点击