The Tech Pursuit
The Dev Shelf
Pages
Home
Interview Questions
About Me
April 30, 2011
Run stored procedure with output parameter in SQL Server
CREATE PROCEDURE spGetData
(
@A INT,
@B INT OUTPUT
)
AS
BEGIN
SET @A = 10
SET @B = @A + 100
END
To run this stored procedure on query prompt we need write in this way
DECLARE @A INT
DECLARE @B INT
SET @A = 50
EXECUTE spGetData @A, @B OUTPUT
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment