- when you create a trigger you have to identify event and action of your trigger but when you create stored procedure you don't identify event and action.
- trigger is run automatically if the event is occured but stored procedure don't run automatically but you have to run it manually
- within a trigger you can call specific stored procedure but within a stored procedure you cann;t call a trigger
-----------------------------------
- Actually triger in action which is performed automatically before or after a event occur and stored procedure is a procedure which is executed when the it is called. Stored procedure is module.
-----------------------------
- Triggers are implicitly called by DB itself while Stored procedure has to be manually called by user.
- Stored procedure can pass the parameters which is not a case with Triggers.
- While creating a Trigger triggering event n action has to be specified which isn’t a case with Stored procedure.
- A Trigger can call the specific Stored procedure in it but the reverse is not true.
1 comment:
This is really useful man , I have seen this question many times in interview.
Thanks
Javin
mysql tutorial
Post a Comment