ALTER PROCEDURE [dbo].[messageCountByWhere]@where varchar(8000) = ' 1=1 ',@recordCount int outputAS SET NOCOUNT ON declare @sqlCount nvarchar(4000) set @sqlCount= 'SELECT @Count=count(-1) FROM [dbo].[message] WHERE ' +@where --print @sqlCount exec sp_executesql @sqlCount,N'@Count int output',@recordCount output RETURN @@Error
count(-1)有啥意思 ? 还有 exec 中 N'@Count int output',@recordCount output 表示什么意思 , 希望给你解释
- 4 回答
- 0 关注
- 378 浏览
添加回答
举报
0/150
提交
取消