Creating a stored procedure with an OUTPUT parameter is not a difficult task, but I have to do it quite often and it is convenient for me to blog it here, so that I have an easily accessible example
Create the stored prodecure like this:
CREATE PROCEDURE _4P_test
@intInput int,
@intOutput int OUTPUT
AS
set @intOutput = @intInput + 1
go
Call it like this:
declare @intResult int
exec _4P_test 3 ,@intResult OUT
select @intResult