如何获取sql的exec执行语句的返回值?
declare @tempStr varchar(100) --临时存放语句
set @tempStr = @whereStr
--满瓶的总库存
set @tempStr=@whereStr+' and stateid='+cast(@fullStateId as varchar(10))
set @execSql ='select @sysNum= count(*) from sfkj_Cylinder '+@tempStr
exec sp_executesql @execSql,N'@sysNum varchar output',@fullNum output
set @tempStr = @whereStr
--满瓶的总库存
set @tempStr=@whereStr+' and stateid='+cast(@fullStateId as varchar(10))
set @execSql ='select @sysNum= count(*) from sfkj_Cylinder '+@tempStr
exec sp_executesql @execSql,N'@sysNum varchar output',@fullNum output