The SQLFOREIGNKEYS view contains one row for every referential constraint
key on a table. The following table describes the columns in the
view:
Table 138. SQLFOREIGNKEYS view
Column Name | Data Type | Description |
---|---|---|
PKTABLE_CAT | VARCHAR(128) | Relational database name |
PKTABLE_SCHEM | VARCHAR(128) | Name of the SQL schema containing the parent table. |
PKTABLE_NAME | VARCHAR(128) | Parent table name. |
PKCOLUMN_NAME | VARCHAR(128) | Parent key column name. |
FKTABLE_CAT | VARCHAR(128) | Relational database name |
FKTABLE_SCHEM | VARCHAR(128) | Name of the SQL schema containing the dependent table of the referential constraint. |
FKTABLE_NAME | VARCHAR(128) | Dependent table name of the referential constraint. |
FKCOLUMN_NAME | VARCHAR(128) | Dependent key name. |
KEY_SEQ | SMALLINT | The position of the column within the key. |
UPDATE_RULE | SMALLINT | Update Rule.
|
DELETE_RULE | SMALLINT | Delete Rule:
|
FK_NAME | VARCHAR(128) | Name of the referential constraint |
PK_NAME | VARCHAR(128) | Name of the unique constraint |
DEFERRABILITY | SMALLINT | Indicates whether the constraint checking can be deferred. Will always be 7. |
UNIQUE_OR_PRIMARY | CHAR(7) | Indicates the type of parent constraint:
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.