标签:
declare @sql nvarchar(max)
declare @nu int
set @sql=‘SELECT * FROM [FMTest].[dbo].[FM_Radio_Station]‘
set @sql=‘SELECT @nu=count(0) from(‘+@sql+‘)aa‘
EXEC sp_executesql @sql,N‘@nu AS INT OUTPUT‘,@nu OUTPUT
SELECT @nu
标签:
原文地址:http://www.cnblogs.com/hank-chen/p/5648104.html