Sunday, October 31, 2010

What is the Difference between Stored Procedure and Trigger ?

stored procedure
stored procedure is a block of code contains sql statements.
stored procedure is a precompiled block of code,which need not be compiled for every time calling.Stored procedure used to perform operation.Stored procedure can accept the parameters from users

Triggers
Triggers get invoked automatically when any operation (insertion,deletion and updation) is performed on particular table.
Triggers can't return any value.So user have no control over it's invocation.
Triggers need to define and can be enable and disable according to need.

No comments:

Post a Comment