在SQL Server 2008中,是否有办法在存储过程执行后获取被填充的结果集(表)的总数。假设我有一个存储过程,其中内部调用另一个存储过程。我想知道它返回了多少个结果集,即内部调用的存储过程。请有人能帮助我吗?例如:
CREATE PROCEDURE sp_GetReports
(
@reportName AS VARCHAR(50)
)
AS
BEGIN
DECLARE @reportProcName AS VARCHAR(50)
SELECT @reportProcName = ReportProcName
FROM ReportMaster
WHERE ReportName = @reportName;
EXEC (@reportProcName)
/*
* Need to get here, total numbers of Result Sets (tables) retrived.
*/
END
GO
Thanks in advance.
@@ROWCount
吗? - Krishnraj Ranasp_
前缀。更多详细信息请参见此处。 - Bill Tür stands with Ukraine