Out Parameters in SQL server/Oracle
Can we write multiple out parameters in SQL server/Oracle, if yes please write one example..
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant SrivastavaRank #581 · 4.2K reputationPosted Jul 28, 2014, 10:30 AM EDT
Yes we can write
A simple example:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE dbo.MultipleOutputParameters
(
@P_Id INT,
@LastName VARCHAR(50) OUTPUT,
@FirstName VARCHAR(50) OUTPUT,
@City VARCHAR(50) OUTPUT
)
AS
BEGIN
SELECT @LastName = LastName,
@FirstName = FirstName,
@City = City
FROM dbo.ADDRESS
WHERE P_Id = @P_Id
END
GO