日期:2014-05-19  浏览次数:20612 次

什么情况下使用out参数?
存储过程可以声明out参数来返回一些值

但是我发现貌似一般的返回值都可以用select来搞定,   不知道什么情况下这个out比较有用?

------解决方案--------------------
当既返回select 的数据集,又需要返回几个数值时,尤其有用。

如:

create proc sp_test (@p1 int,@p2 int, @p3 int output)
as


set @p3=100

select * from 表名

go