34,838
社区成员




declare @RCount int, @TiaoJian varchar(100)
set @TiaoJian=?
declare @sql nvarchar(1000)
set @sql='select @RCount=count(*) from Product' + @TiaoJian
exec sp_executesql @sql, N'@RCount int output', @RCount output
select @RCount
select @RCount =COUNT(*) FROM Product where @TiaoJian
select @RCount =exec('COUNT(*) FROM Product where @TiaoJian')