MySQL Triggers can be viewed, manipulated and deleted once it is created. The trigger file can be viewed using SELECT/SHOW statements and in data/databaseFolder/tableName.trg of MYSQL. The below command shows all the triggers of the table:
The SELECT statement to view trigger is shown below. It displays all the triggers from entire database. The 'WHERE' condition can be applied to get the triggers of a particular database.
SELECT * FROM Information_schema.TRIGGERS;
NOTE: to manipulate the triggers the trigger has to be deleted and recreated.
To remove an existing trigger, we can use DROP TRIGGER statement. The syntax is:
DROP TRIGGER tableName.triggerName;
DROP TRIGGER tblresults.tgrVerdict;
No comments have been made yet.
Please login to leave a comment. Login now