标签:.com student png har server HERE class 存储 输入参数
1.表
2.无参
ALTER PROCEDURE kxy_proc AS BEGIN update Student set Age=Age+1 where ID=1 END
调用
exec kxy_proc
3.有输入参数
ALTER PROCEDURE kxy_proc @id int, @name varchar(10) AS BEGIN update Student set Age=Age+1 where ID=@id and Name=@name END
调用
exec kxy_proc 1,kxy
4.有输出参数
ALTER PROCEDURE kxy_proc @id int, @age int OUTPUT AS BEGIN SELECT @age=s.Age from Student s WHERE s.ID=@id; end
调用
DECLARE @age int exec kxy_proc 1,@age OUTPUT SELECT @age as age
标签:.com student png har server HERE class 存储 输入参数
原文地址:https://www.cnblogs.com/wskxy/p/10795524.html