当前位置: 代码迷 >> Sql Server >> 在存储过程中,怎么得到这个存储过程中的某个结果集的个数
  详细解决方案

在存储过程中,怎么得到这个存储过程中的某个结果集的个数

热度:79   发布时间:2016-04-27 16:31:13.0
在存储过程中,如何得到这个存储过程中的某个结果集的个数。
在存储过程中,如何得到这个存储过程中的某个结果集的个数(此结果集是要返回给调用者的)。

例如:

declare   @count   int
select   @count=0

select   *   from   t   where   id <10       //它是要返回给调用者的

//select   @count=count(*)   from   t   where   id <10   [email protected]


------解决方案--------------------
@@rowcount 跟在操作语句后
  相关解决方案