Dynamic Stored Procedure with output
How to make Dynamic Stored Procedure with output variable?
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
Shubham KumarRank #621 · 3.8K reputationPosted Feb 2, 2016, 11:56 PM EST
SET @Sql='SELECT @Id=Id FROM tablname'
EXECUTE sp_executesql @Sql, N'@Id varchar(50) OUTPUT', @id=@Id OUTPUT