Pages

Sunday, February 1, 2009

differences strored procedures and triggers

Stored Procedure:

A stored procedure can be created with no parameters, IN parameters, OUT parameters. There can be many parameters per stored procedure.

One has to manually call this Object to do some actions.

Trigger:

It is a fragment of code that tells Database to fire or run BEFORE or AFTER a table is modified.

It has the power to make sure that a column is filled in with default information make sure that an audit row is inserted into another table after finding that the new information is inconsistent with other stuff in the database.

No comments: