Retrieves a description of the foreign key columns in the given foreign
key table that reference the primary key columns of the given primary
key table (describe how one table imports another's key). This should
normally return a single foreign key/primary key pair because most
tables import a foreign key from a table only once. They are ordered by
FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
Each foreign key column description has the following columns:
* PKTABLE_CAT String => primary key table catalog (may be
<code>null</code>)
* PKTABLE_SCHEM String => primary key table schema (may be
<code>null</code>)
* PKTABLE_NAME String => primary key table name
* PKCOLUMN_NAME String => primary key column name
* FKTABLE_CAT String => foreign key table catalog (may be
<code>null</code>) being exported (may be <code>null</code>)
* FKTABLE_SCHEM String => foreign key table schema (may be
<code>null</code>) being exported (may be null)
* FKTABLE_NAME String => foreign key table name being exported
* FKCOLUMN_NAME String => foreign key column name being exported
* KEY_SEQ short => sequence number within foreign key
* UPDATE_RULE</B> short => What happens to foreign key when primar
y is updated:
importedNoAction - do not allow update of primary key if
it has been imported
importedKeyCascade - change imported key to agree with
primary key update
importedKeySetNull - change imported key to NULL if its
primary key has been updated
importedKeySetDefault - change imported key to default
values if its primary key has been updated
importedKeyRestrict - same as importedKeyNoAction (for
ODBC 2.x compatibility)
* DELETE_RULE short => What happens to the foreign key when primar
y is deleted.
importedKeyNoAction - do not allow delete of primary key
if it has been imported
importedKeyCascade - delete rows that import a deleted key
importedKeySetNull - change imported key to NULL if its
primary key has been deleted
importedKeyRestrict - same as importedKeyNoAction (for
ODBC 2.x compatibility)
importedKeySetDefault - change imported key to default if
its primary key has been deleted
* FK_NAME String => foreign key name (may be <code>null</code>)
* PK_NAME String => primary key name (may be <code>null</code>)
* DEFERRABILITY short => can the evaluation of foreign key
constraints be deferred until commit
importedKeyInitiallyDeferred - see SQL92 for definition
importedKeyInitiallyImmediate - see SQL92 for definition
importedKeyNotDeferrable - see SQL92 for definition
primaryCatalog a catalog name; must match the catalog name as it is
stored in the database; "" retrieves those without a catalog; null means
drop catalog name from the selection criteria
primarySchema a schema name; must match the schema name as it is stored
in the database; "" retrieves those without a schema; null means drop
schema name from the selection criteria
primaryTable the name of the table that exports the key; must match the
table name as it is stored in the database
foreignCatalog a catalog name; must match the catalog name as it is
stored in the database; "" retrieves those without a catalog; null means
drop catalog name from the selection criteria
foreignSchema a schema name; must match the schema name as it is stored
in the database; "" retrieves those without a schema; null means drop
schema name from the selection criteria
foreignTable the name of the table that imports the key; must match the
table name as it is stored in the database
Syntax
CROSS_REFERENCE
PRIMARY_CATALOG primary_catalog
PRIMARY_SCHEMA primary_schema
PRIMARY_TABLE primary_table
FOREIGN_CATALOG foreign_catalog
FOREIGN_SCHEMA foreign_schema
FOREIGN_TABLE foreign_table
THREAD MODE: SINGLE THREADED command