【发布时间】:2010-10-29 21:53:57
【问题描述】:
我想查找哪些表与特定表相关。我可以很容易地看到所有外键约束,但是我正在查看的表是主键表而另一个表是引用表的表呢?
【问题讨论】:
我想查找哪些表与特定表相关。我可以很容易地看到所有外键约束,但是我正在查看的表是主键表而另一个表是引用表的表呢?
【问题讨论】:
SQL Developer 中的步骤
View > Data Modeler > Browser 打开Browser 视图/选项卡。 Browser view/tab*) 右键单击Relational Models 并选择New Relational Model,这将打开一个新窗口。 这应该会创建一个新的空白图表,可以将表格从Connections 视图拖放到图表中。
【讨论】:
Dependencies 选项卡上看到的特定视图/表的引用
请参阅 Oracle SQL Developer 数据建模器:http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
【讨论】:
不清楚您是否正在寻找GUI解决方案,但您可以通过以下方式从字典中查询信息:
select table_name from user_constraints
where r_constraint_name in
(select constraint_name
from user_constraints
where constraint_type in ('P','U')
and table_name = upper('&tableOfInterest')
)
【讨论】:
user_constraints 替换为all_constraints 以检查关系。