Application Express User's Guide > Building Queries with Query... > Creating Relationships Betw... > Joining Objects Automatically
Joining Objects Automatically |
Previous |
Next |
When you join objects automatically, the Query Builder suggests logical, existing parent and child relationships between existing columns.
To join objects automatically:
On the Database Home Page, click the SQL icon.
Click the Query Builder icon.
Query Builder appears.
From the Object Selection pane, select an object.
The object displays in the Design pane.
Click the small icon in the upper left corner of the object. Depending upon the selected object, the icon label displays as Table Actions or View Actions.
The Actions window appears. Use the Actions window to select all columns within the current object or objects related to the current object.
In the Actions window, select the appropriate options:
Check All - Select this option to select the first twenty columns in the current object.
Add Parent - Displays tables that are referenced as a foreign key to the current object.
Add Child - Displays tables that reference the current object in a foreign key.
If using Add Parent or Add child, the selected object appears and a green line connects the foreign key columns.
Select additional columns to be included in your query.
You can view the SQL statement resulting from the join by positioning the cursor over the green line.
Click Run to execute the query.
The Results pane displays the query results.