Add Foreign Key - Infopops

Specifies the schema of the parent table.

The parent table must have a primary key. The foreign key specified for the table being created must have the same number of columns as the primary key of its parent table. Furthermore, the nth column in the foreign key must be compatible in terms of data type with the nth column of the primary key of its parent table.

To modify, click the down arrow to display a list of existing schemas and select one, or type the name of the parent table's schema in the box. You can specify an ordinary or delimited identifier.

Specifies the name of the parent table. The parent table must have a primary key. The foreign key specified for the table being created must have the same number of columns as the primary key of its parent table. Furthermore, the nth column in the foreign key must be compatible in terms of data type with the nth column of the primary key of its parent table.

To modify, click the down arrow to display a list of existing schemas and select one, or type the name of the parent table's name in the box. You can specify an ordinary or delimited identifier.

Lists all of the columns defined as primary key columns in the parent table. The primary key columns are listed in order of significance.

Use this box to view the list of primary key columns for the parent table. The foreign key columns that you select in the Available columns box must match the parent table's primary key columns in meaning and data type.

Lists all of the columns defined for the table. Use this box to select the column or columns that you want to define as foreign key columns and then click the > push button. Each column that you select must match a column listed in the Primary key box in meaning and data type. You can select one or more columns at the same time.

Attention: You cannot define columns of data type LOB, LONG VARCHAR, or LONG VARGRAPHIC to be part of a foreign key.

Moves the selected columns in the Available columns box to the Foreign key box.

Moves all columns displayed in the Available columns box to the Foreign key box.

Moves the selected columns in the Foreign key box to the Available columns box.

Moves all columns displayed in the Foreign key box to the Available columns box.

Lists all of the columns defined as foreign key columns. Use this box to view the list of foreign key columns or to select a column or columns to remove from the list with the < push button.

To add a column to this list, select a column from the Available columns box and then click the > push button.

Optional: Specifies what action is to take place on the dependent table when a row of the parent table is deleted.

Specifies what action is to take place on the dependent table when a row of the parent table is updated. Click the down arrow and select an action.

Optional: Type a name for the constraint that you are defining. This name can contain up to 18 characters and can be an ordinary or delimited identifier.

If you do not specify a constraint name, one is generated for you.