If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the package, as described in Using the Example Databases.
Open a connection:
Create a table with a primary key:
Create another table. The PersonId column will be used for a foreign key constraint referencing the PEOPLE table's primary key:
Add the foreign key constraint:
The foreign key appears as an index in the EMPLOYEES table:
The primary key of the PEOPLE table now appears as an imported key of EMPLOYEES: