

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is MySQL trigger and triggering events related to it?
Basically, MySQL trigger is a set of statements stored in the database catalog. This database object is always associated with a table that is defined to be activated when a particular kind of event occurs for that table. In other sense, we can say that MySQL trigger is a special kind of stored procedure. Its main difference with the stored procedure is that it is not called directly like a stored procedure. It is called automatically when a data modification even against the table occurs. The trigger can be executed when you run one of the following MySQL statements on the table: INSERT, UPDATE, and DELETE and it can be invoked before or after the event. Triggers appear to execute quietly without the user even knowing of their existence. They cannot include COMMIT or ROLLBACK statements.
Triggering events are basically the action of time i.e. when the trigger activates. Followings are the triggering events related to MySQL triggers −
- INSERT − As its name suggests, this indicates the trigger event is related to the insertion of data in MySQL table. In this case, the trigger would be triggered either before or after the insertion of data happens.
- DELETE − As its name suggests, this indicates the trigger event is related to the deletion of data in MySQL table. In this case, the trigger would be triggered either before or after deletion of data happens.
- UPDATE − As its name suggests, this indicates the trigger event is related to the update of data in MySQL table. In this case, the trigger would be triggered either before or after an updating of data happens.
- Related Questions & Answers
- What is MySQL event and how it is related to trigger?
- What is ECMAScript and how it is related to JavaScript?
- What is ionic and how is it related with HTML5?
- What is Profit Planning and how is it related to Finance Function?
- How is it possible for a MySQL trigger to execute multiple statements?
- How to trigger the same function with jQuery multiple events?
- Is truth and innocence related?
- What is the difference between Local Events and Global Events in jQuery?
- Is it good to dream? How is your success related to your dreams?
- MySQL Installation Related Programs
- Is rainfall related to forests?
- What is the difference between jQuery Ajax Events and Methods?
- What is Jailbreaking and is it Safe?
- What is MySQL REGEXP operator and how it handles pattern matching?
- What does DELIMITER // do in a Trigger in MySQL?