Trigger is a bunch of statement that executes in response to some predetermined event. The event may be inserting, updating, or deleting records, and the bunch of statement get executed either prior to or immediately following the event.
Create a Trigger
MySQL triggers can be created using the following syntax:
{ INSERT | UPDATE | DELETE }
ON
So it is possible to suggest whether the trigger should execute before or after the query, whether it should get executes on row updation, insertion or deletion, and to what table the trigger applies.
View Triggers
You can view existing triggers by SHOW TRIGGERS command or by INFORMATION_SCHEMA command.
SHOW TRIGGERS command
SHOW TRIGGERS command prototype is:
Change a Trigger
To change a trigger simply delete and then re-create the triggers.
Delete a Trigger
Use DROP TRIGGER command to delete a trigger, prototype for deleting a trigger is:
- Kiran's blog
- 517 reads













the article was really nice dude, really helpful
Post new comment