sql server exec返回值

declare @num int, @sqls nvarchar(4000)
set @sqls='select @a=123 '
exec sp_executesql @sqls,N'@a int output',@num output
select @num

posted @ 2017-03-17 13:55  赤狐(zcm123)  阅读(1238)  评论(0编辑  收藏  举报