Hi,
How to create stored procedure with parameter in sql server 2008 ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Arul SelvanPosted Aug 19, 2011, 6:55 AM
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