Written By:- Isha Malhotra
Our Website:-Tech Altum
Our Website:-Tech Altum
Stored
Procedure
The stored procedure is a set of SQL
Statements. In stored procedure we can accept the input and return the output.
It is precompiled object. Stored procedure increases the performance of the database
As they are recompiled.
Syntax of Stored Procedure:-
Create procedure Proc_Name
As
Begin
SQL
Statements
End
Example of Stored Procedure
Following is a procedure in which we select
The data from table student
Create
proc Proc_Select
As
Begin
Select
* from student;
End
To execute the procedure
We have to run the following command.
Execute Proc_name
After running this procedure you came to know how
procedure create and run. Now let’s move the parameterized procedure