Stored procedure is a database object which contains one or more T-SQL statements that are stored in database.To use the stored procedure you send a request for it to be executed. When server recieves the request, it executes the stored procedure.
Adavantages:
Stored procedures improve the database performance because stored procedures are pre-compiled and executes directly when client sends the request to execute the procedure.
Syntax:
CREATE PROCEDURE spVendorByState
@VendorState varchar(50)
AS
BEGIN
SELECT * FROM Table
END
GO
Adavantages:
Stored procedures improve the database performance because stored procedures are pre-compiled and executes directly when client sends the request to execute the procedure.
Syntax:
CREATE PROCEDURE spVendorByState
@VendorState varchar(50)
AS
BEGIN
SELECT * FROM Table
END
GO
No comments:
Post a Comment