Example:
Objective: In this example, we will use output parameters in the store procedure.
CREATE PROCEDURE SP_PR_OUT(@Dept as varchar(20) , @EmployeeCount as int OUTPUT) As Begin
SELECT @EmployeeCount = COUNT(*) FROM Tbl_Emp WHERE Department = @dept
End
Execute output store procedure:
Output: