Articles → SQL SERVER → Enhanced Execute Statement With Result Sets In SQL Server

Enhanced Execute Statement With Result Sets In SQL Server






Purpose







Sample




Picture showing the sample table



Stored Procedure




SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

create procedure [dbo].[getPopulation]
As
SELECT [Id]
      ,[State]
      ,[In2011]
      ,[in2023]
      ,[Difference]
  FROM [gyansangrah].[dbo].[population]
GO



With Result Sets In Action




exec getPopulation 
with result sets
((
   [Id] float,
   [State] varchar(200),
   [In2011] float,
   [in2023] float,
   [Difference] float


))







Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, October 24, 2023

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250