Answer the question
In order to leave comments, you need to log in
How to get structure of all resultsets from stored procedure?
(MS SQL Server 2012)
This is how we can get the structure of the first (single) data set.
CREATE PROCEDURE dbo._tmp_ResSet
AS BEGIN
SELECT 1 AS Num;
SELECT 2 AS Num, 'two' AS NumStr;
END
GO
DECLARE @sql NVARCHAR(MAX) = N'EXEC _tmp_ResSet';
SELECT *
FROM sys.dm_exec_describe_first_result_set(@sql, NULL, 1) c
WHERE c.is_hidden = 0;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question