Oracle:SQL 查询查找属于表的所有触发器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4896621/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle: SQL query to find all the triggers belonging to the tables?
提问by Rajesh Kumar G
how can i find all the triggers that belong to a table?
我怎样才能找到属于一个表的所有触发器?
回答by yanjost
The following will work independent of your database privileges:
以下将独立于您的数据库权限工作:
select * from all_triggers
where table_name = 'YOUR_TABLE'
The following alternate options may or may not work depending on your assigned database privileges:
以下替代选项可能有效,也可能无效,具体取决于您分配的数据库权限:
select * from DBA_TRIGGERS
or
或者
select * from USER_TRIGGERS
回答by a_horse_with_no_name
回答by diagonalbatman
Another table that is useful is:
另一个有用的表是:
SELECT * FROM user_objects WHERE object_type='TRIGGER';
You can also use this to query views, indexes etc etc
您还可以使用它来查询视图、索引等
回答by tbone
Use the Oracle documentationand search for keyword "trigger" in your browser.
使用Oracle 文档并在浏览器中搜索关键字“触发器”。
This approach should work with other metadata type questions.
这种方法应该适用于其他元数据类型的问题。