Do you have a set of tasks that are repeatedly performed in your programs?. Procedures are one way of executing repeated tasks with different parameters. Functions and procedures are called upon to do a specific task. A procedure may perform a simple task or even a complex task.
A stored procedure is a
group of Transact-SQL statements compiled into a single execution
plan. Stored procedures return data in four ways:
- Output parameters, which can return either data(such as an integer or character value) or a cursor variable( cursors are result sets that can be retrieved one row at a time)
- Return codes, which are always an integer value.
- A result set for each SELECT statement contained in the stored procedure or any other stored procedures called by the stored procedure.
- A global cursor that can be referenced outside the stored procedure.
Syntax:
Create procedure procName
As
Begin
//statements
End
To execute the stored
procedure we have to use exec command, EXEC procName.
If you are curious to
learn more about Stored Procedures, you can join a .NET course. Softlogic Systems IT Employment Training Company conducts good courses in .NET. Drop in
at Softlogic for a free career counselling.
For more details visit Softlogic Systems Chennai or dial +91 8681884318.
For more details visit Softlogic Systems Chennai or dial +91 8681884318.