Tuesday, May 14, 2013

Get list of existing TRIGGERs in MYSQL

While MySQL has features like StoredProcedure and View, it doesn't have any option for displaying TRIGGER list in the 'Schemata' tab (right) section of QueryBrowser.
Generally, we need a third party control like MySQL Workbench to get the list of existing TRIGGER lists.But there is another way through which we can get existing trigger lists and that is from the Metadata(Data about data).
To get all the trigger list irrespective of the database name:
 
SELECT * FROM information_schema.TRIGGERS;

To get list of trigger against a specific database:
 
SELECT * FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA='database_name';
 
 
Source: http://www.mindfiresolutions.com/Get-list-of-existing-TRIGGERs-in-MYSQL-856.php