ALTER FOREIGN KEY statement
The ALTER FOREIGN KEY statement defines changes to a foreign key.
ALTER FOREIGN KEY tableOwner 1 .tableName 1 .constraintName 1 | This option specifies the fully qualified name of the foreign key to be changed. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NAME constraintName 2 | This option specifies the new name of the foreign key. If the NAME parameter is not specified, Db2 automatically generates the name of the foreign key. | ||||||||||
REFERENCETB tableOwner 2. tableName 2 | This option specifies the name of the table to which the foreign key references. | ||||||||||
KEYCOLUMNS (columnName, ...) | This option specifies the columns that are included in the definition of the foreign key. | ||||||||||
REFCOLUMNS (columnName, ...) | This option specifies the names of the parent key columns. | ||||||||||
ON DELETE | This option specifies the new rule that determines the action to take when a row of the parent table for the foreign key is deleted. The following table lists valid values for the ON DELETE parameter.
| ||||||||||
ENFORCED | This option specifies whether Db2 enforces the referential constraint. ENFORCED parameter values
|
Related topic