如何获取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
posted @ 2010-04-01 16:28  大笑江湖  阅读(1903)  评论(0编辑  收藏  举报