使用特定表名的 Oracle 视图列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21019584/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:10:15  来源:igfitidea点击:

List of Oracle views using specific table name

oracleviewfindnames

提问by user613114

I wish to find a list of all views under specific schema using mentioned table name.

我希望使用提到的表名在特定模式下找到所有视图的列表。

e.g. if view1 and view2 uses table1, using table name "table1", I wish to find view names "view1" and view2".

例如,如果view1 和view2 使用table1,使用表名“table1”,我希望找到视图名称“view1”和view2。

Please let me know, how can I do it.

请让我知道,我该怎么做。

回答by Wernfried Domscheit

Use this query:

使用此查询:

SELECT * 
FROM all_dependencies 
WHERE TYPE = 'VIEW'
    AND referenced_type = 'TABLE'

回答by Joe

select 
    * 
from 
    all_dependencies
where 
    type='VIEW'
    and referenced_name like '%table_name%'
    and referenced_type = 'TABLE'