getExportedKeys(String catalog, String schema, String table)
Syntax:
ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
Description:
Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table). 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 | parent key table catalog (may be null) |
PKTABLE_SCHEM | String | parent key table schema (may be null) |
PKTABLE_NAME | String | parent key table name |
PKCOLUMN_NAME | String | parent key column name |
FKTABLE_CAT | String | foreign key table catalog (may be null) being exported (may be null) |
FKTABLE_SCHEM | String | foreign key table schema (may be null) 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( a value of 1 represents the first column of the foreign key, a value of 2 would represent the second column within the foreign key). |
UPDATE_RULE | short | What happens to foreign key when parent key is updated:
|
DELETE_RULE | short | What happens to the foreign key when parent key is deleted.
|
FK_NAME | String | foreign key name (may be null) |
PK_NAME | String | parent key name (may be null) |
DEFERABILITY | short | can the evaluation of foreign key constraints be deferred until commit
|
Parameters:
catalog - a catalog name; must match the catalog name as it is stored in this database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
schema - a schema name; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
table - a table name; must match the table name as it is stored in this database
Returns:
a ResultSet
object in which each row is a foreign key column description
Throws:
SQLException - if a database access error occurs