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
declare @num int, @sqls nvarchar(4000)
set @sqls='select @a=123 '
exec sp_executesql @sqls,N'@a int output',@num output
select @num