Sunday, 26 January 2014

Difference between trigger and stored procedure

  • A stored procedure can accept parameters while a trigger cannot.
  • A trigger can’t return any value while stored procedures can.
  • A trigger is executed automatically on some event while a stored procedure needs to be explicitly called.
  • Triggers are used for insertions, update and deletions on tables while stored procedures are often using independently in the database.
  • A trigger cannot be written in a stored procedure. However, the reverse is not possible.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More