executesql 存储过程
发布时间:2016-12-29 来源:查字典编辑
摘要:复制代码代码如下:declare@ttvarchar(20)set@tt='monisubbouns'declare@intintdecla...
复制代码 代码如下:
declare @tt varchar(20)
set @tt = 'monisubbouns'
declare @int int
declare @sql nvarchar(500)
set @sql = 'select @int=count(*) from ' + @tt
exec sp_executesql @sql,N'@int int output',@int output
print @int