Created
April 21, 2020 19:47
-
-
Save aadennis/8b09c6914e151c24f1491a93502df0a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use a_db1 | |
go | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
-- ============================================= | |
-- Description: Show the use of a simple out , | |
-- mainly for demoing calling from PowerShell. | |
-- ============================================= | |
drop PROCEDURE DemoSp | |
go | |
CREATE PROCEDURE DemoSp | |
-- Add the parameters for the stored procedure here | |
@in int, | |
@out int out | |
AS | |
BEGIN | |
SET NOCOUNT ON; | |
select @out = @in * 2; | |
SELECT @in, @out | |
END | |
GO | |
declare | |
@inArg int = 21, | |
@outArg int | |
exec DemoSp @inArg, @outArg out | |
print 'Back in the caller [' + convert(nvarchar,@outArg) + ']'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment