This article will describe you how to find foreign keys and related table with Toad for Oracle.
Start from opening Schema Browser from Database in toolbar.
Fig. 1. Schema Browser in toolbar
Option 1: Table Details
- In the Schema Browser find table which relations you want to see and click on it.
- In object details window switch to Constraints tab.
- In object details window switch to Referential tab.
In Table is referenced by (Child table) are listed tables which have defined foreign keys that refers to selected table.
In Table references (Parent tables) are listed tables used by foreign keys defined in selected table.
Option 2: Constraint List
In the Schema Browser you can find Constraints section where are listed all constraints (with FK also). There is possibility to filter Constraints by select Filter Constraint. After selecting such a key in details window will appear informations about it, like used tables and column relations.
Option 3: Alter Table window
In Schema Browser look for a table, right click on it and select Alter.
In Alter Table window switch to Constraints tab.
Option 4: ER Diagram
From Toolbar select Database -> Report -> ER Diagram.
In new opened window click on Add Objects button. In Add to ER Diagram window, change depth to 1, to see only selected table referential.
In the result ER Diagram you can see connections between tables and columns used for constraints. When you move your mouse over a connection or constraint name, columns used in this constraint will be highlighted (in example DEPARTMENT_ID in both DEPARMENTS and EMPLOYEES tables).