如何列出MySQL数据库中的所有触发器? [英] How do you list all triggers in a MySQL database?

查看:266
本文介绍了如何列出MySQL数据库中的所有触发器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

列出MySQL数据库中所有触发器的命令是什么?

What is the command to list all triggers in a MySQL database?

推荐答案

列出所有触发器的命令是:

The command for listing all triggers is:

show triggers;

,或者您可以通过以下方式直接访问INFORMATION_SCHEMA表:

or you can access the INFORMATION_SCHEMA table directly by:

select trigger_schema, trigger_name, action_statement
from information_schema.triggers

  • 您可以从5.0.10版本开始执行此操作.
  • 有关 TRIGGERS表的详细信息在这里.
    • You can do this from version 5.0.10 onwards.
    • More information about the TRIGGERS table is here.
    • 这篇关于如何列出MySQL数据库中的所有触发器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆