Back To Normal

Subscribe To Our E-Mail Newsletter

Monday, May 3, 2010

What is Stored Procedure in SQL Server?


Couch ModePrint It

Stored Procedures:

Stored procedures are extremely similar to the constructs seen in other programming languages.
They accept data in the form of input parameters that are specified at execution time.

Benifits of Stored Procedures:
1. PreComplied execution
2. Efficient reuse
3. Enhanced security controls

Example:
 CREATE PROCEDURE sp_GetQuantity
 @Name varchar(10)
 AS
 SELECT Product, Quantity
 FROM Product_Table
 WHERE Product = @Name

For executing the above Procedure:
  EXECUTE  sp_GetQuantity 'A7'

Click Here For Smileys :D
:D
:)
:[
;)
:D
:O
(6)
(A)
:'(
:|
:o)
8)
(K)
(M)

No comments:

560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .