复制代码 代码如下:
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
欢迎分享,转载请注明来源:内存溢出
复制代码 代码如下:
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
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)