标签:creat col 传递 create print sum exec font 传递参数
1 --创建两个数相加的存储过程 2 CREATE PROCEDURE usp_Add 3 @num1 int, 4 @num2 int 5 as 6 begin 7 select @num1 + @num2 8 end 9 10 --创建传递参数的存储过程 11 CREATE PROCEDURE usp_Add2 12 @num1 int, 13 @num2 int, 14 @num3 int output 15 as 16 begin 17 select @num1 + @num2 18 end 19 ----------------------------------------- 20 21 --调用存储过程 22 23 EXEC usp_Add @num1=300,@num2=2 24 ----------------------------------------- 25 26 declare @sum int 27 EXEC usp_Add2 @num1=300,@num2=2, @num3 = @sum output; 28 print @sum
标签:creat col 传递 create print sum exec font 传递参数
原文地址:https://www.cnblogs.com/wangxingzhou/p/9608831.html