List all triggers in MySQL database

Knowledge-base/Databases-queries/MySQL queries

Sep 29th, 2021

[wp_social_sharing social_options='facebook,twitter,linkedin,pinterest,reddit' twitter_username='softbuilder1' facebook_text='Share on Facebook' twitter_text='Share on Twitter' linkedin_text='Share on Linkedin' pinterest_text="Share on Pinterest" reddit_text="Share on Reddit" icon_order='f,t,l,p,x,r' show_icons='2' before_button_text='' text_position='' social_image='']

 

In this article, we will see how to get all triggers in MySQL database. We will present 3 ways to display all triggers for MySQL database tables.

1. Using SQL Query

The following SQL script should return a list of all triggers for tables of your database.

SELECT trigger_schema,  
       trigger_name, 
       event_object_table as table_name,  
       event_manipulation,  
       action_statement as trigger_statement 
FROM information_schema.triggers 
WHERE trigger_schema ='your_schema_name' 
ORDER BY table_name, 
         trigger_name;

Sample results
The result of the given query will display the triggers list:

list all triggers in MySQL database

2. Using MySQL interactive shell command-line

In the following, we will explain how you can display a list of all triggers for the table in a MySQL database using MySQL interactive shell command line. You can get a list of all triggers using the SHOW TRIGGERS command.

list all triggers in MySQL database using MySQL shell

3. List all triggers in MySQL database with ERBuilder Data Modeler

With ERBuilder Data Modeler you can display all triggers for a specific table in your MySQL database.
Firstly, reverse engineer your MySQL database with ERBuilder data modeler. You will get the ER diagram and all the objects of your database. From the treeview, you can see all triggers for a specific table in a MySQL database as shown in the screen down below.

Furthermore, you can display the trigger statement just by double-clicking on the trigger name and from there you can edit it, delete it or add new triggers for the table.

Start modeling your database with us today

Subscribe To Our Newsletter

Subscribe to our email newsletter today to receive updates of the latest news, tutorials and special offers!

Share on:

[wp_social_sharing social_options='facebook,twitter,linkedin,pinterest,reddit' twitter_username='softbuilder1' facebook_text='Share on Facebook' twitter_text='Share on Twitter' linkedin_text='Share on Linkedin' pinterest_text="Share on Pinterest" reddit_text="Share on Reddit" icon_order='f,t,l,p,x,r' show_icons='2' before_button_text='' text_position='' social_image='']

Choose a product

Choose a product and get 15 Day fully-functional free trial. No credit card required