Hi,
How to create stored procedure with parameter in sql server 2008 ?
How to create stored procedure with parameter in sql server database
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 attend4days leftRegister
Arul Selvan25 reputationPosted Aug 19, 2011, 2:55 AM EDT
i passed id as a parameter like that you can pass parameter for stored procedure
if you want to pass more than one parameter use ,
like @id INT,@name varchar(20)
CREATE PROCEDURE pro_GetEmployee
@id INT
AS
BEGIN
SELECT * FROM tbl_emp WHERE empid=@id
END
GO
EXEC pro_GetEmployee 10001
Stored procedure parameter are to be two type IN and OUT
the default is IN as we did earlier example not necessary to mention.
The OUT parameter used for return value from stored procedure