Metadata Introspection Method Properties
DatabaseMetaData interface methods let you retrieve comprehensive information about the database. Interface methods like getColumns return a result set; values of capabilities like "introspect.column.column_name" represent fields in that result set; and one would do resultSet.getString(capability_value) to retrieve the value of a field.
The field value can be retrieved as a STRING argument, a field number, or a field position to get the same information.
|
Method |
Result Set Field |
Description |
|
getCatalogs |
introspect.catalog.table_cat |
The catalog name of the catalog table |
|
getColumns |
introspect.column.column_def |
The column default |
|
introspect.column.column_name |
The column name |
|
|
introspect.column.column_size |
The column size |
|
|
introspect.column.data_type |
The data type of the column |
|
|
introspect.column.decimal_digits |
Decimal digits of the column |
|
|
introspect.column.is_nullable |
The is_nullable flag of the column |
|
|
introspect.column.nullable |
The nullable flag of the column |
|
|
introspect.column.ordinal_position |
The ordinal position of the column |
|
|
introspect.column.table_cat |
The catalog name of the column table |
|
|
introspect.column.table_name |
The table name of the column table |
|
|
introspect.column.table_schem |
The schema name of the column table |
|
|
introspect.column.type_name |
The type name of the column |
|
|
getImportedKeys |
introspect.fkey.deferrability |
The deferability flag for the foreign key |
|
introspect.fkey.delete_rule |
The delete rule for the foreign key |
|
|
introspect.fkey.fk_name |
The foreign key name |
|
|
introspect.fkey.fkcolumn_name |
The foreign key column name |
|
|
introspect.fkey.fktable_cat |
The catalog name for the foreign key table |
|
|
introspect.fkey.fktable_name |
The foreign key table name |
|
|
introspect.fkey.fktable_schem |
The schema name for the foreign key table |
|
|
introspect.fkey.key_seq |
The foreign-key’s key sequence |
|
|
introspect.fkey.pk_name |
The primary key name for the foreign key |
|
|
introspect.fkey.pkcolumn_name |
The primary key column name for the foreign key |
|
|
introspect.fkey.pktable_cat |
Foreign key’s primary key table’s catalog name |
|
|
introspect.fkey.pktable_name |
The primary key table name for the foreign key |
|
|
introspect.fkey.pktable_schem |
The primary key table for the foreign key |
|
|
introspect.fkey.update_rule |
The update rule for the foreign key |
|
|
getIndexInfo |
introspect.index.asc_or_desc |
Ascending or descending (asc_or_desc) index |
|
introspect.index.cardinality |
The cardinality of the index |
|
|
introspect.index.column_name |
The column name of the index |
|
|
introspect.index.index_name |
The name of the index |
|
|
introspect.index.non_unique |
The non-unique flag of the index |
|
|
introspect.index.ordinal_position |
The ordinal position of the index |
|
|
introspect.index.table_cat |
The catalog name of the index table |
|
|
introspect.index.table_name |
The table name of the index table |
|
|
introspect.index.table_schem |
The schema name of the index table |
|
|
introspect.index.type |
The type of the index |
|
|
getPrimaryKeys |
introspect.pkey.column_name |
The column name for the primary key |
|
introspect.pkey.key_seq |
The key sequence for the primary key |
|
|
introspect.pkey.pk_name |
The primary key’s name |
|
|
introspect.pkey.table_cat |
The catalog name for the primary key table |
|
|
introspect.pkey.table_name |
The table name for the primary key table |
|
|
introspect.pkey.table_schem |
The schema name for the primary key table |
|
|
getProcedureColumns |
introspect.parameter.column_name |
The column name of the parameter |
|
introspect.parameter.column_type |
The column type of the parameter |
|
|
introspect.parameter.data_type |
The data type of the parameter |
|
|
introspect.parameter.length |
The length of the parameter |
|
|
introspect.parameter.nullable |
The nullable flag for the parameter |
|
|
introspect.parameter.precision |
The precision of the parameter |
|
|
introspect.parameter.procedure_cat |
The catalog name of the parameter’s procedure |
|
|
introspect.parameter.procedure_name |
The parameter’s procedure name |
|
|
introspect.parameter.procedure_schem |
The schema name of the parameter’s procedure |
|
|
introspect.parameter.scale |
The scale of the parameter |
|
|
introspect.parameter.type_name |
The type name of the parameter |
|
|
getProcedures |
introspect.procedure.procedure_cat |
The catalog name of the procedure |
|
introspect.procedure.procedure_name |
The procedure name of the procedure |
|
|
introspect.procedure.procedure_schem |
The schema name of the procedure |
|
|
getSchemas |
introspect.schema.table_cat |
The catalog name of the schema’s table |
|
introspect.schema.table_schem |
The schema name of the schema’s table |
|
|
getTables |
introspect.table.table_cat |
The catalog name of the table’s table |
|
introspect.table.table_name |
The table name of the table’s table |
|
|
introspect.table.table_schem |
The schema name of the table’s table |
|
|
introspect.table.table_type |
The table type of the table’s table |