Oracle 参考完整性信息

Oracle referential Integrity information

是否有存储 table 引用完整性信息的 Oracle 数据字典 table/view? 我认为 all_tab_column 会显示哪一列是 Pk/Fk。

文档中有一节关于 Viewing Constraint Information:

Oracle 数据库提供以下视图,使您能够查看 table 上的约束定义并识别约束中指定的列:

DBA_CONSTRAINTS/ALL_CONSTRAINTS/USER_CONSTRAINTS - DBA view describes all constraint definitions in the database. ALL view describes constraint definitions accessible to current user. USER view describes constraint definitions owned by the current user.

DBA_CONS_COLUMNS/ALL_CONS_COLUMNS/USER_CONS_COLUMNS - DBA view describes all columns in the database that are specified in constraints. ALL view describes only those columns accessible to current user that are specified in constraints. USER view describes only those columns owned by the current user that are specified in constraints.

您可以在文档的其他部分获得有关这些内容的更多信息; ALL_CONSTRAINTS and ALL_CONS_COLUMNS.

您没有说出您要查找的确切内容,但是 有查看 primary/unique 和外键的示例。

由于您使用 SQL Developer 标记了您的问题,如果您从展开的“连接”窗格中查看 table,则会有一个“约束”选项卡,其中列出了 table 上的所有约束。如果您 select 列表中的约束,您可以看到它适用的列。您可以使用数据建模器查看 table 之间的关系。