Wednesday, March 31, 2010

Stored Procedures and Triggers

Stored procedure normally used for performing tasks
But the Trigger normally used for tracing and auditing logs.

Stored procedures should be called explicitly by the user in order to execute
But the Trigger should be called implicitly based on the events defined in the table.

Stored Procedure can run independently
But the Trigger should be part of any DML events on the table.

Stored procedure can be executed from the Trigger
But the Trigger cannot be executed from the Stored procedures.

Stored Procedures can have parameters.
But the Trigger cannot have any parameters.