Monday, October 22, 2012

Types Of Store Procedure


                           Types Of Store Procedure
There are two main types of stored procedure -
system stored procedures and user-defined stored procedures.
system stored procedures=Every time we add or modify a table, make a backup plan, or perform any other administrative function from within Enterprise Manager, we actually call a stored procedure specifically written to complete the desired action. These stored procedures are known as system stored procedures,

User Stored Procedures=A user stored procedure is any program that is stored and compiled within SQL Server (but not in the master database).
User stored procedures can be categorized into three distinct types -

user stored procedures=User defined stored procedures provide an interface to a set of processing without the need for the end user to know the structure of the tables, the business logic of the organization, or the mathematics involved, to produce the end result.

Triggers=A trigger is a stored procedure which fires when a specified table action takes place.
user defined functions=A user defined function is a stored procedure which can take parameters, but only return one item of information, either a scalar value or a table of data.

No comments:

Post a Comment