odbc_foreignkeys
odbc_foreignkeys
Retrieves a list of foreign keys
**odbc_foreignkeys** Odbc\Connection $odbc $pk_catalog string $pk_schema string $pk_table string $fk_catalog string $fk_schema string $fk_table
Retrieves a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table
odbc``pk_catalogThe catalog ('qualifier' in ODBC 2 parlance) of the primary key table.
pk_schemaThe schema ('owner' in ODBC 2 parlance) of the primary key table.
pk_tableThe primary key table.
fk_catalogThe catalog ('qualifier' in ODBC 2 parlance) of the foreign key table.
fk_schemaThe schema ('owner' in ODBC 2 parlance) of the foreign key table.
fk_tableThe foreign key table.
odbc.result.object-return-falseforfailure
The result set has the following columns:
odbc.result.driver-specific
-
PKTABLE_CAT -
PKTABLE_SCHEM -
PKTABLE_NAME -
PKCOLUMN_NAME -
FKTABLE_CAT -
FKTABLE_SCHEM -
FKTABLE_NAME -
FKCOLUMN_NAME -
KEY_SEQ -
UPDATE_RULE -
DELETE_RULE -
FK_NAME -
PK_NAME -
DEFERRABILITYIf the foreign keys associated with a primary key are requested, the result set is ordered by , , and . If the primary keys associated with a foreign key are requested, the result set is ordered by , , and .
FKTABLE_CAT``FKTABLE_SCHEM``FKTABLE_NAME``KEY_SEQ``PKTABLE_CAT``PKTABLE_SCHEM``PKTABLE_NAME``KEY_SEQIf contains a table name, returns a result set containing the primary key of the specified table and all of the foreign keys that refer to it.
pk_table``odbc_foreignkeysIf contains a table name, returns a result set containing all of the foreign keys in the specified table and the primary keys (in other tables) to which they refer.
fk_table``odbc_foreignkeysIf both and contain table names, returns the foreign keys in the table specified in that refer to the primary key of the table specified in . This should be one key at most.
pk_table``fk_table``odbc_foreignkeys``fk_table``pk_tableodbc_tables``odbc_primarykeys