Unlimited Web Space

Enjoy Unlimited web hosting

Aug 9, 2011

STORE PROCEDURE

Store procedures are a procedures that can execute a query n number of times by supplying only the required values.

CREATE PROCEDURE ProcName
@n nvarchar(20),
@id int

AS
BEGIN
--(Write any query)
 Select * from TableName where Column1 like @n and Column2 like @id
END
GO

Exec ProcName 'name',2

No comments:

Post a Comment