Thursday, June 16, 2022

How to execute stored procedure with output parameter

Right Click on stored procedure and click on execute stored procedure

or

 DECLARE @return_value int,

@RecordCount int


EXEC @return_value = [dbo].[GetCustomersPageWiseNew]

@batchCode = N'batch-hr-00002-db',

@PageIndex = 1,

@PageSize = 10,

@RecordCount = @RecordCount OUTPUT


SELECT @RecordCount as N'@RecordCount'


SELECT 'Return Value' = @return_value


GO


reference:- https://stackoverflow.com/questions/1589466/execute-stored-procedure-with-an-output-parameter

No comments:

Post a Comment