8.6.29 getExportedKeys(String catalog, String schema, String table)
- Organization of this subsection
(1) Function
This method acquires information about a referencing table's foreign keys.
The information about foreign keys that can be acquired depends on the privileges of the HADB user who executes this method. For details about the relationship between privileges and the information that can be acquired, see the topic Scope of information in dictionary tables and system tables that can be referenced by HADB users in the HADB Setup and Operation Guide.
(2) Format
public synchronized ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
(3) Arguments
- String catalog
-
Specifies the catalog name of the referenced table. This argument is ignored, if specified.
- String schema
-
Specifies the schema name pattern# of the referenced table.
- String table
-
Specifies the table name pattern# of the referenced table.
- #
-
For details about the special characters that can be specified in each pattern, see (4) Special characters that can be specified in pattern character strings in 8.6.1 List of the methods in the DatabaseMetaData interface.
(4) Return value
The following table shows the format of the ResultSet object that is returned.
Column No. |
Type |
Column name |
Description |
---|---|---|---|
1 |
String |
PKTABLE_CAT |
Catalog name of the referenced table. The method always returns a null character string. |
2 |
String |
PKTABLE_SCHEM |
Schema name of the referenced table |
3 |
String |
PKTABLE_NAME |
Table name of the referenced table |
4 |
String |
PKCOLUMN_NAME |
Column name of primary key |
5 |
String |
FKTABLE_CAT |
Catalog name of the referencing table. The method always returns a null character string. |
6 |
String |
FKTABLE_SCHEM |
Schema name of the referencing table |
7 |
String |
FKTABLE_NAME |
Table name of the referencing table |
8 |
String |
FKCOLUMN_NAME |
Column name of foreign key |
9 |
short |
KEY_SEQ |
Sequence number of foreign key |
10 |
short |
UPDATE_RULE |
Operation that is applied to foreign keys when the primary key is updated
|
11 |
short |
DELETE_RULE |
Operation that is applied to foreign keys when the primary key is deleted
|
12 |
String |
FK_NAME |
Constraint name of referential constraints |
13 |
String |
PK_NAME |
Index name of the primary key |
14 |
short |
DEFERRABILITY |
Whether evaluation of constraints on the foreign key can be postponed until the transaction is committed
|
(5) Exceptions
If this Connection object is closed before this method is executed, the JDBC driver throws an SQLException.