如何重 批处理中 返回值?
declare   @count   int   --保存查询条数 
 exec( "select   count(*)   from   t1 ")     
 现在我想把这个求出的记录条数   返回给外部定义的   @count   这个变量   如何做啊? 
 大虾指点下   
------解决方案--------------------use pubs 
 go   
 declare @count int --保存查询条数 
 declare @sql nvarchar(4000) 
 set @sql= 'select @count=count(*) from titles ' 
 exec sp_executesql @sql, N '@count int output ', @count output 
 select @count   
 --result 
 -----------  
 18   
 (1 row(s) affected)