【发布时间】:2014-01-09 11:57:32
【问题描述】:
我希望使用提到的表名找到特定架构下所有视图的列表。
例如如果 view1 和 view2 使用 table1,使用表名“table1”,我希望找到视图名“view1”和 view2”。
请告诉我,我该怎么做。
【问题讨论】:
我希望使用提到的表名找到特定架构下所有视图的列表。
例如如果 view1 和 view2 使用 table1,使用表名“table1”,我希望找到视图名“view1”和 view2”。
请告诉我,我该怎么做。
【问题讨论】:
select
*
from
all_dependencies
where
type='VIEW'
and referenced_name like '%table_name%'
and referenced_type = 'TABLE'
【讨论】:
使用这个查询:
SELECT *
FROM all_dependencies
WHERE TYPE = 'VIEW'
AND referenced_type = 'TABLE'
【讨论】:
AND owner = 'MYSCHEMA'.