Creating a simple relationship (Query Builder)
To create a relationship using the mouse:
- In the Query window, open the tables you want
to relate.
- While the table is displayed, select the column
(either select the check box next to the column, or double-click the column
name) that you want to relate (the foreign key).
- While holding down the mouse button, drag the
cursor to the related column in the second table (the primary key) to
draw a relationship line.
- Once the target column is highlighted, release
the mouse button to anchor the relationship line. By default, the relationship
is inactive (the line appears gray).
To create a relationship using the Set Relationship
dialog box:
- Click
in the Icon
Bar to display the Set Relationship dialog box - Type the origin (A->)
and target (->B) column names.
You
must type the complete table and column names (separate the table name
from its column name with a period). A->
represents the table's foreign key(s), and ->B represents the table's
primary key(s). Separate
additional primary and foreign keys with commas.
Query Builder draws a relationship line between the two columns. - Click Close.
To create a relationship using a shortcut:
- Click
in the Icon
Bar to display the Set Relationship dialog box - Click inside field A.
- In the Query window, select the column (either
select the check box next to the column, or double-click the column name)
. Query Builder automatically places the table and column name in field
A.
- Repeat the procedure for field B.
See also
About Query
Builder relationships
Activating
and deactivating a relationship (Query Builder)
Creating a composite
relationship (Query Builder)
Creating a self-relationship
(Query Builder)
Creating an unmatched
relationship (Query Builder)
Deleting a relationship
(Query Builder)
Copyright © 1984, 2005, Oracle. All rights reserved.