Query trigger information

2024-03-05 01:54:26  Updated

You can query the information about existing triggers in a database, such as the definition, status, and syntax of each trigger.

You can query trigger information in the following ways:

  • Use the SHOW statement

    obclient>SHOW TRIGGERS [FROM database_name];
    

    Here, database_name specifies the database name. If the FROM database_name clause is not used, the information about triggers in the current database is retrieved.

  • Use a view

    obclient>SELECT * FROM information_schema.triggers [where trigger_name = 'xx'];
    

    If the WHERE clause is not used, the information about all triggers is retrieved.

Contact Us