简体   繁体   English

通过SQL语句获取数据库中当前所有触发器的名称(Oracle SQL Developer)

[英]Get the names of all Triggers currently in the database via SQL statement (Oracle SQL Developer)

I need a sql statement that retrieves the names of all triggers currently setup in the database. 我需要一条sql语句来检索数据库中当前设置的所有触发器的名称。 I am using Oracle SQL Developer version 1.5.5, with java version 1.7. 我正在将Oracle SQL Developer 1.5.5版和Java 1.7版一起使用。

Something like this: 像这样:

select OBJECT_NAME from OBJECTS where OBJECT_TYPE = 'Trigger' 从OBJECTS中选择OBJECT_NAME,其中OBJECT_TYPE ='Trigger'

What you have is pretty close: 您所拥有的非常接近:

select owner, object_name
from all_objects
where object_type = 'TRIGGER'

Or more usefully: 或更有用的是:

select owner, trigger_name, table_owner, table_name, triggering_event
from all_triggers

all_triggers has other columns to give you more information that all_objects does, like when the trigger fires. all_triggers还有其他列可为您提供all_objects所做的更多信息,例如触发触发器时。 You can get more information about this and other useful data dictionary view in the documentation . 您可以在文档中获取有关此视图和其他有用的数据字典视图的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM