Each row in the SYSFKEY system view describes a foreign key constraint in the system. The underlying system table for this view is ISYSFKEY.
Column name | Column type | Column constraint |
---|---|---|
foreign_table_id | UNSIGNED INT | NOT NULL |
foreign_index_id | UNSIGNED INT | NOT NULL |
primary_table_id | UNSIGNED INT | NOT NULL |
primary_index_id | UNSIGNED INT | NOT NULL |
match_type | TINYINT | NOT NULL |
check_on_commit | CHAR(1) | NOT NULL |
nulls | CHAR(1) | NOT NULL |
foreign_table_id The table number of the foreign table.
foreign_index_id The index number for the foreign key.
primary_table_id The table number of the primary table.
primary_index_id The index number of the primary key.
match_type The matching type for the constraint. Matching types include:
Value | Match type |
---|---|
0 | Use the default matching |
1 | SIMPLE |
2 | FULL |
129 | SIMPLE UNIQUE |
130 | FULL UNIQUE |
For more information on match types, see the MATCH clause of the CREATE TABLE statement.
check_on_commit (Y/N) Indicates whether INSERT and UPDATE statements should wait until the COMMIT to check if foreign keys are still valid.
nulls (Y/N) Indicates whether the columns in the foreign key are allowed to contain the NULL value. Note that this setting is independent of the nulls setting in the columns contained in the foreign key.
PRIMARY KEY (foreign_table_id, foreign_index_id)
FOREIGN KEY (foreign_table_id, foreign_index_id) references SYS.ISYSIDX (table_id, index_id)
FOREIGN KEY (primary_table_id, primary_index_id) references SYS.ISYSIDX (table_id, index_id)