Changing foreign keys when altering a table

Use the Change Foreign Key window to alter foreign keys for your table. A foreign key is a column or set of columns in a table whose values are required to match at least one primary key value of a row of its parent table. A referential constraint is the rule that the values of the foreign key are valid only if either:

Fields and controls

Authorities and privileges



To alter a foreign key:

  1. Optional: Select a different parent table.

    1. Use the Table schema box to specify the new parent table's schema name.

    2. Use the Table name box to specify the new parent table's name. The Primary key box displays a list of the primary key columns defined for the new parent table.

  2. Optional: Select a new foreign key.

    1. In the Available columns box, select a column or columns that you want to define as a foreign key. Each column that you select must match a primary key column for the parent table in meaning and data type.

    2. Click on the > push button to move the selected column or columns to the Foreign key box.

  3. Optional: Change the action specified in the On delete box.

  4. Optional: Change the action specified in the On update box.

  5. Optional: Change the name of the constraint by typing a new name in the Constraint name field.

  6. Click on OK to make the changes you specified for the foreign key and close the Change Foreign Key window.

  7. If you do not want to make any additional changes to the table, click on OK to alter your table and close the Alter Table notebook. Otherwise, continue on to one or more of the optional tasks.


Related information