Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » Views » System views in Sybase Central

SYSFILE system view Next Page

SYSFKEY system view


Each row in the SYSFKEY system view describes a foreign key constraint in the system. The underlying system table for this view is ISYSFKEY.

Columns
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_typeTINYINTNOT 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:

ValueMatch type
0Use the default matching
1SIMPLE
2FULL
129SIMPLE UNIQUE
130FULL 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.

Constraints on underlying system table

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)