Answers for "sql stored procedure output parameter"

SQL
2

output parameter use with stored procedure

CREATE PROCEDURE uspFindProductByModel (
    @model_year SMALLINT,
    @product_count INT OUTPUT
) AS
BEGIN
    SELECT 
        product_name,
        list_price
    FROM
        production.products
    WHERE
        model_year = @model_year;

    SELECT @product_count = @@ROWCOUNT;
END;
Posted by: Guest on November-29-2020
0

sql stored procedure output parameter

CREATE PROCEDURE [dbo].[test_Procedure] 
	@input  VARCHAR(10),
    @output VARCHAR(20) output
AS
  BEGIN
      IF @input >= 1
        BEGIN
            SET @output = 'Result is from procedure';
            RETURN;
        END
  END

DECLARE @get VARCHAR(20);

EXEC test_Procedure 1, @get output
SELECT @get
Posted by: Guest on July-09-2021
0

ms sql server stored procedure output parameter

Copy CodeCREATE PROCEDURE spGetEmployeeCountByGender
@Gender nvarchar(20),
@EmployeeCount int Output
AS
BEGIN
SELECT @EmployeeCount = COUNT(Id) 
FROM tblEmployee 
WHERE Gender = @Gender
END
Posted by: Guest on February-17-2021

Code answers related to "sql stored procedure output parameter"

Code answers related to "SQL"

Browse Popular Code Answers by Language