declare @num int,
@sqls nvarchar(4000)
set @sqls='select @a=count(*) from users'
--如果将该字符串中的值输出来
exec sp_executesql @sqls,N'@a int output',@num output
select @num
declare @num int,
@sqls nvarchar(4000)
set @sqls='select @a=count(*) from users'
--如果将该字符串中的值输出来
exec sp_executesql @sqls,N'@a int output',@num output
select @num