background image
<< Adding a Foreign Key Constraint | Adding a Check Constraint >>
<< Adding a Foreign Key Constraint | Adding a Check Constraint >>

Using the Add Foreign Key Window

Creating and Using Tables
Creating and Using Database Objects 3-11
4.
In the Add Foreign Key window, enter the following information:
Set the foreign key name to
SCORES_EVAL_FK
.
Set Column Name to
EVALUATION_ID
.
Set Reference Table Name to
EVALUATIONS
.
Set Referencing Column to
EVALUATION_ID
.
Click Apply.
5.
In the Confirmation window, click OK.
You have now created a foreign key constraint on the
evalution_id
column
from the
evaluations
table.
6.
Add another foreign key constraint by repeating steps 2 through 5, with the
following parameters:
Set the foreign key name to
SCORES_PERF_FK
.
Set Column Name to
PERFORMANCE_ID
.
Set Reference Table Name to
PERFORMANCE_PARTS
.
Set Referencing Column to
PERFORMANCE_ID
.
Click Apply.
The following SQL statements were added to your table definition:
CONSTRAINT "SCORES_EVAL_FK" FOREIGN KEY ("EVALUATION_ID")
REFERENCES "HR"."EVALUATIONS" ("EVALUATION_ID") ENABLE
CONSTRAINT "SCORES_PERF_FK" FOREIGN KEY ("PERFORMANCE_ID")