34,588
社区成员
发帖
与我相关
我的任务
分享
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')