MySQL – Remove all triggers by using the SQL queries

Sometimes you want to remove all existing triggers in your database so that you can create the new one.

You can execute the following SQL query to generate all necessary SQL queries to remove the triggers in your database.

SELECT Concat(‘DROP TRIGGER ‘, Trigger_Name, ‘;’) FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA = ‘your_database_name’;

After that, you can export the result into the SQL file to execute those queries.

Hope it is useful for you 🙂

Revisions

No comments yet.

Leave a Reply