Interface DatabaseMetaData

public interface DatabaseMetaData extends Object

The DatabaseMetaData interface provides methods that return information about the database.

A part of its methods returns ResultSets. Normal ResultSet methods such as getString() and getInt() must be used to retrieve the data from these ResultSets. A SQLException is thrown if a given form of metadata isn’t available.

The methods that take String pattern arguments return information using these patterns. Within a pattern String, % means match any substring of 0 or more characters, and _ means match any one character. The various methods that use patterns return only metadata entries matching the search pattern. A search criterion is suppressed if its pattern is set to null.

If a driver doesn’t support a metadata method, an exception is thrown. If such a method normally returns a ResultSet, a ResultSet (which may be empty) is returned or a SQLException is thrown.

Fields

The following fields are static integer values provided by the DatabaseMetaData interface. They are used by several database metadata methods that return result sets, under the columns named in uppercase in the following descriptions.

bestRowNotPseudo

public static final int bestRowNotPseudo

BEST ROW PSEUDO_COLUMN:

If bestRowNotPseudo is in this column, it indicates that the best row identifier isn’t a pseudocolumn.

bestRowPseudo

public static final int bestRowPseudo

BEST ROW PSEUDO_COLUMN:

If bestRowPseudo is in this column, it is a pseudocolumn.

bestRowSession

public static final int bestRowSession

BEST ROW SCOPE:

It is valid for the remainder of the current session.

bestRowTemporary

public static final int bestRowTemporary

BEST ROW SCOPE:

Very temporary, while using row

bestRowTransaction

public static final int bestRowTransaction

BEST ROW SCOPE:

It is valid for the remainder of the current transaction.

bestRowUnknown

public static final int bestRowUnknown

BEST ROW PSEUDO_COLUMN:

The driver is unable to indicate whether or not this is a pseudocolumn.

columnNoNulls

public static final int columnNoNulls

COLUMN NULLABLE:

It may not allow NULL values.

columnNullable

public static final int columnNullable

COLUMN NULLABLE:

It definitely allows NULL values.

columnNullableUnknown

public static final int columnNullableUnknown

COLUMN NULLABLE:

Its nullability is unknown.

importedKeyCascade

public static final int importedKeyCascade

IMPORT KEY UPDATE

For update, change the imported key to agree

_RULE and DELETE_RULE:

with the primary key update. For delete, delete rows that import a deleted key.

importedKeyInitiallyDeferred

public static final int importedKeyInitiallyDeferred

IMPORT KEY DEFERRABILITY:

See SQL92 for more information.

importedKeyInitiallyImmediate

public static final int importedKeyInitiallyImmediate

IMPORT KEY DEFERRABILITY:

See SQL92 for more information.

importedKeyNoAction

public static final int importedKeyNoAction

IMPORT KEY UPDATE
_RULE
and DELETE_RULE:

Don’t allow the primary key to be updated or deleted if it has been imported.

importedKeyNotDeferrable

public static final int importedKeyNotDeferrable

IMPORT KEY DEFERRABILITY:

See SQL92 for more information.

importedKeyRestrict

public static final int importedKeyRestrict 

IMPORT KEY UPDATE
_RULE
and DELETE_RULE:

Don’t allow the primary key to be updated or deleted if it has been imported.

importedKeySetDefault

public static final int importedKeySetDefault

IMPORT KEY UPDATE
_RULE and DELETE_RULE

Change imported key to default values if its primary key has been updated or deleted.

importedKeySetNull

public static final int importedKeySetNull

IMPORT KEY UPDATE
_RULE
and DELETE_RULE:

Change imported key to NULL if its primary key has been updated or deleted.

procedureColumnUnknown

public static final int procedureColumnUnknown

COLUMN_TYPE:

Unknown type for a procedure’s parameter

procedureColumnIn

public static final int procedureColumnIn

COLUMN_TYPE:

It is an IN parameter.

procedureColumnInOut

public static final int procedureColumnInOut

COLUMN_TYPE:

It is an INOUT parameter.

procedureColumnOut

public static final int procedureColumnOut

COLUMN_TYPE:

It is an OUT parameter.

procedureColumnResult

public static final int procedureColumnResult

COLUMN_TYPE:

The result column is a ResultSet.

procedureColumnReturn

public static final int procedureColumnReturn

COLUMN_TYPE:

The procedure returns a value.

procedureNoNulls

public static final int procedureNoNulls

TYPE NULLABLE:

The procedure doesn’t allow NULL values.

procedureNoResult

public static final int procedureNoResult

PROCEDURE_TYPE:

The procedure doesn’t return a result.

procedureNullable

public static final int procedureNullable

TYPE NULLABLE:

It allows NULL values.

procedureNullableUnknown

public static final int procedureNullableUnknown

TYPE NULLABLE:

Its nullability is unknown.

procedureResultUnknown

public static final int procedureResultUnknown

PROCEDURE_TYPE:

It may return a result.

procedureReturnsResult

public static final int procedureReturnsResult

PROCEDURE_TYPE:

It returns a result.

sqlStateSQL99

public static final int sqlStateSQL99

A constant indicating that SQLException.getSQLState returns a SQL99 SQLSTATE.

sqlStateXOpen

public static final int sqlStateXOpen

A constant indicating that SQLException.getSQLState returns an X/Open SQL CLI SQLSTATE.

tableIndexClustered

public static final short tableIndexClustered

INDEX INFO TYPE:

This identifies a clustered index.

tableIndexHashed

public static final short tableIndexHashed

INDEX INFO TYPE:

This identifies a hashed index.

tableIndexOther

public static final short tableIndexOther

INDEX INFO TYPE:

This identifies some form of index other than an index using clusters, a hashed index, or an index using statistics.

tableIndexStatistic

public static final short tableIndexStatistic

INDEX INFO TYPE:

This identifies table statistics that are returned in conjunction with a table’s index descriptions.

typeNoNulls

public static final int typeNoNulls

TYPE NULLABLE:

It doesn’t allow NULL values.

typeNullable

public static final int typeNullable

TYPE NULLABLE:

It allows NULL values.

typeNullableUnknown

public static final int typeNullableUnknown

TYPE NULLABLE:

Its nullability is unknown.

typePredBasic

public static final int typePredBasic

TYPE INFO SEARCHABLE:

Supported except for WHERE . . . LIKE

typePredChar

public static final int typePredChar

TYPE INFO SEARCHABLE:

Only supported with WHERE . . . LIKE

typePredNone

public static final int typePredNone

TYPE INFO SEARCHABLE:

No support

typeSearchable

public static final int typeSearchable

TYPE INFO SEARCHABLE:

Supported for all WHERE clauses

versionColumnNotPseudo

public static final int versionColumnNotPseudo

VERSION COLUMNS PSEUDO_COLUMN:

?It isn’t a pseudocolumn.

versionColumnPseudo

public static final int versionColumnPseudo

VERSION COLUMNS PSEUDO_COLUMN:

?It is a pseudocolumn.

versionColumnUnknown

public static final int versionColumnUnknown

VERSION COLUMNS PSEUDO_COLUMN:

It may or may not be a pseudocolumn.

Methods

allProceduresAreCallable

public boolean allProceduresAreCallable() throws SQLException 

This checks whether the current user can call all the procedures returned by getProcedures.

Returns: true if the procedures are callable

allTablesAreSelectable

public boolean allTablesAreSelectable() throws SQLException

This checks whether all the tables returned by getTable can be selected by the current user.

Returns: true if the tables are selectable

dataDefinitionCausesTransactionCommit

public boolean dataDefinitionCausesTransactionCommit() throws SQLException

This checks whether a data definition statement within a transaction forces the transaction to commit.

Returns: true if the data definition forces the transaction to commit

dataDefinitionIgnoredInTransactions

public boolean dataDefinitionIgnoredInTransactions() throws SQLException

This checks whether a data definition statement within a transaction will be ignored.

Returns: true if the data definition will be ignored

deletesAreDetected

public boolean deletesAreDetected(int type) throws SQLException

This checks whether a visible row delete can be detected by calling the method ResultSet.rowDeleted().

Parameters:

type:

One of the following the ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if a row delete can be detected

doesMaxRowSizeIncludeBlobs

public boolean doesMaxRowSizeIncludeBlobs() throws SQLException

This checks whether getMaxRowSize() includes LONGVARCHAR and LONGVARBINARY BLOBs.

Returns: true if these BLOBs are included

getAttributes

public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException

This gets a description of type attributes available in the specified catalog. The result set contains the following columns:

TYPE_CAT String:

The type catalog (may be null)

TYPE_SCHEM String:

The type schema (may be null)

TYPE_NAME String:

The type name

ATTR_NAME String:

The attribute name

DATA_TYPE short:

The attribute type SQL type from java.sql.Types

ATTR_TYPE_NAME String:

The data source–dependent type name

ATTR_SIZE int:

The column size

DECIMAL_DIGITS int:

The number of fractional digits

NUM_PREC_RADIX int:

The radix

NULLABLE int:

Whether or not NULL is allowed, according to the following values:

  • attributeNoNulls: May not allow NULL values

  • attributeNullable: Definitely allows NULL values

  • attributeNullableUnknown: Nullability unknown

REMARKS String:

A comment describing the column (may be null)

ATTR_DEF String:

The default value (may be null)

SQL_DATA_TYPE int:

Unused

SQL_DATETIME_SUB int:

Unused

CHAR_OCTET_LENGTH int:

The maximum number of bytes in the column

ORDINAL_POSITION int:

The index of column in the table

IS_NULLABLE String:

The column nullability

SCOPE_CATALOG String:

The catalog of the table that is the scope of a reference attribute (null if DATA_TYPE isn’t REF)

SCOPE_SCHEMA String:

The schema of the table that is the scope of a reference attribute

SCOPE_TABLE String:

The table name that is the scope of a reference attribute

SOURCE_DATA_TYPE short:

The source type of a distinct type

Parameters:

catalog:

A catalog name, "" for no catalog, or null for any catalog

schemaPattern:

A schema name pattern, "" for no schema, or null for any schema

typeNamePattern:

A table name pattern

attributeNamePattern:

A column name pattern

Returns: A result set containing the attribute descriptions

getBestRowIdentifier

public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException

This returns a set of column descriptions that uniquely identifies a row of a table. They are ordered by SCOPE.

The result set has the following columns:

SCOPE short:

The actual scope of the result is one of the following:

  • bestRowTemporary: Very temporary, while using row

  • bestRowTransaction: Valid for the remainder of the current transaction

  • bestRowSession: Valid for the remainder of the current session

COLUMN_NAME String:

The column name

DATA_TYPE short:

The SQL data type from java.sql.Types

TYPE_NAME String:

The data-source–dependent type name

COLUMN_SIZE int:

The precision for the data type, such as the number of decimal digits if the type is float, for example

BUFFER_LENGTH int:

Not used

DECIMAL_DIGITS short:

The scale

PSEUDO_COLUMN short:

A pseudocolumn that can have one of these values:

  • bestRowUnknown: May or may not be pseudocolumn

  • bestRowNotPseudo: Isn’t a pseudocolumn

  • bestRowPseudo: Is a pseudocolumn

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; null means don’t use catalogs for the selection criteria.

schema:

A schema name; "" retrieves those without a schema.

table:

A table name.

scope:

The scope of interest; the values are the same as SCOPE.

nullable:

Include columns that are nullable.

Returns: A ResultSet; each row is a column description.

getCatalogs

public ResultSet getCatalogs() throws SQLException

This gets a table of catalog names available in the database. The results are ordered by catalog name. The catalog column is

TABLE_CAT String:

Catalog name

Returns: A ResultSet containing one row per catalog name

getCatalogSeparator

public String getCatalogSeparator() throws SQLException

This gets the separator between the catalog and table name.

Returns: The catalog separator string

getCatalogTerm

public String getCatalogTerm() throws SQLException

This gets the term used for catalogs.

Returns: The vendor term for catalog

getColumnPrivileges

public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException

This returns a description of the access rights for the columns of a table. COLUMN_NAME and PRIVILEGE order the privileges.

The ResultSet contains rows of privileges and has the following columns:

TABLE_CAT String:

The table catalog (may be null).

TABLE_SCHEM String:

The table schema (may be null).

TABLE_NAME String:

The table name.

COLUMN_NAME String:

The column name.

GRANTOR:

The grantor of access (may be null).

GRANTEE String:

The grantee of access.

PRIVILEGE String:

The name of access (such as SELECT, INSERT, UPDATE, and REFERENCES).

IS_GRANTABLE String:

If the grantee is permitted to grant to others, the column contains YES, NO if it isn’t permitted, or null if unknown.

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; null means don’t use catalogs for the selection criteria.

schema:

A schema name; "" retrieves those without a schema.

table:

A table name.

columnNamePattern:

A column name pattern.

Returns: A ResultSet; each row is a description of a column privilege.

See also: getSearchStringEscape

getColumns

public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException

This returns a ResultSet containing a description of table columns matching the criteria available in a catalog. The ResultSet is ordered TABLE_SCHEM, TABLE_ NAME, and ORDINAL_POSITION.

The ResultSet has the following columns:

TABLE_CAT String:

The table catalog (may be null)

TABLE_SCHEM String:

The table schema (may be null)

TABLE_NAME String:

The table name

COLUMN_NAME String:

The column name

DATA_TYPE short:

The SQL type from java.sql.Types

TYPE_NAME String:

The data source–dependent type name

COLUMN_SIZE int:

The column size (the maximum number of characters for the CHAR or DATE type or decimal precision for NUMERIC or DECIMAL types)

BUFFER_LENGTH:

Isn’t used

DECIMAL_DIGITS int:

The number of fractional digits

NUM_PREC_RADIX int:

The radix (typically either 10 or 2)

NULLABLE int:

Contains one of these values:

  • columnNoNulls: May not allow NULL values

  • columnNullable: Definitely allows NULL values

  • columnNullableUnknown: Nullability unknown

REMARKS String:

A comment describing the column (may be null)

COLUMN_DEF String:

The default value (may be null)

SQL_DATA_TYPE int:

Unused

SQL_DATETIME_SUB int:

Unused

CHAR_OCTET_LENGTH int:

The length of the column in bytes

ORDINAL_POSITION int:

The index of the column in the table (starting at 1)

IS_NULLABLE String:

NO if NULL values aren’t allowed, YES if the column may allow NULL values, or an empty string if this attribute is unknown

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; null means don’t use catalogs for the selection criteria.

schemaPattern:

A schema name pattern; "" retrieves those without a schema.

tableNamePattern:

A table name pattern.

columnNamePattern:

A column name pattern.

Returns: a ResultSet; each row is a column description.

See also: getSearchStringEscape

getConnection

public Connection getConnection() throws SQLException

This gets the connection used to obtain the metadata object.

Returns: The connection

getCrossReference

public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException

This describes the foreign keys of a table and the primary keys of another table that they refer to. They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.

The ResultSet contains foreign key column descriptions. It contains the following columns:

PKTABLE_CAT String:

The primary key table catalog (may be null)

PKTABLE_SCHEM String:

The primary key table schema (may be null)

PKTABLE_NAME String:

The primary key table name

PKCOLUMN_NAME String:

The primary key column name

FKTABLE_CAT String:

The foreign key table catalog being exported (may be null)

FKTABLE_SCHEM String:

The foreign key table schema being exported (may be null)

FKTABLE_NAME String:

The foreign key table name being exported

FKCOLUMN_NAME String:

The foreign key column name being exported

KEY_SEQ short:

The sequence number within the foreign key

UPDATE_RULE short:

What happens to the foreign key when the primary key is updated, according to the following values:

  • importedKeyNoAction: Don’t allow the update of the primary key if it has been imported.

  • importedKeyCascade: Change the imported key to agree with the primary key update.

  • importedKeyRestrict: Don’t allow the update of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been updated.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been updated.

DELETE_RULE short:

What happens to the foreign key when the primary key is deleted, according to the following values:

  • importedKeyNoAction: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeyCascade: Delete rows that import a deleted key.

  • importedKeyRestrict: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been deleted.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been deleted.

FK_NAME String:

The foreign key identifier (may be null)

PK_NAME String:

The primary key identifier (may be null)

DEFERRABILITY short:

Specifies whether the evaluation of foreign key constraints can be deferred until commit, based on the following values:

  • importedKeyInitiallyDeferred: See SQL92 for definition.

  • importedKeyInitiallyImmediate: See SQL92 for definition.

  • importedKeyNotDeferrable: See SQL92 for definition.

Parameters:

primaryCatalog:

A catalog name; "" retrieves those without a catalog; the catalog name criteria is suppressed if null.

primarySchema:

A schema name pattern; "" retrieves those without a schema.

primaryTable:

The table name that exports the key.

foreignCatalog:

A catalog name; "" retrieves those without a catalog; the catalog name criteria is suppressed if null.

foreignSchema:

A schema name pattern; "" retrieves those without a schema.

foreignTable:

The table name that imports the key.

Returns: A ResultSet; each row is a foreign key column description.

See also: getImportedKeys

getDatabaseMajorVersion

public int getdatabaseMajorVersion() throws SQLException

This returns the database major version number_—_for example, the 2 in 2.0.

Returns: The database major version

getDatabaseMinorVersion

public int getdatabaseMinorVersion() throws SQLException 

This returns the database minor version number_—_for example, the 3 in 1.3.

Returns: The database minor version

getDatabaseProductName

public String getDatabaseProductName() throws SQLException

This gets the name of the database product in use.

Returns: The database product name

getDatabaseProductVersion

public String getDatabaseProductVersion() throws SQLException

This gets the version of the database product in use.

Returns: The database version

getDefaultTransactionIsolation

public int getDefaultTransactionIsolation() throws SQLException

This gets the database’s default transaction isolation level. See the possible values in java.sql.Connection.

Returns: The default isolation level

See also: Connection

getDriverMajorVersion

public int getDriverMajorVersion()

This gets the JDBC driver’s major version number.

Returns: The JDBC driver major version

getDriverMinorVersion

public int getDriverMinorVersion()

This gets the JDBC driver’s minor version number.

Returns: The JDBC driver minor version number

getDriverName

public String getDriverName() throws SQLException

This gets the name of the JDBC driver in use.

Returns: The JDBC driver name

getDriverVersion

public String getDriverVersion() throws SQLException 

This gets the version of the JDBC driver in use.

Returns: The JDBC driver version

getExportedKeys

public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException

This gets a description of foreign key columns that reference a 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.

The ResultSet contains foreign key column descriptions. Each row has these columns:

PKTABLE_CAT String:

The primary key table catalog (may be null)

PKTABLE_SCHEM String:

The primary key table schema (may be null)

PKTABLE_NAME String:

The primary key table name

PKCOLUMN_NAME String:

The primary key column name

FKTABLE_CAT String:

The foreign key table catalog being exported (may be null)

FKTABLE_SCHEM String:

The foreign key table schema being exported (may be null)

FKTABLE_NAME String:

The foreign key table name being exported

FKCOLUMN_NAME String:

The foreign key column name being exported

KEY_SEQ short:

The sequence number within the foreign key

UPDATE_RULE short:

What happens to the foreign key when the primary key is updated, according to the following values:

  • importedKeyNoAction: Don’t allow the update of the primary key if it has been imported.

  • importedKeyCascade: Change the imported key to agree with the primary key update.

  • importedKeyRestrict: Don’t allow the update of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been updated.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been updated.

DELETE_RULE short:

What happens to the foreign key when the primary key is deleted, according to the following values:

  • importedKeyNoAction: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeyCascade: Delete rows that import a deleted key.

  • importedKeyRestrict: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been deleted.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been deleted.

FK_NAME String:

The foreign key identifier (may be null)

PK_NAME String:

The primary key identifier (may be null)

DEFERRABILITY short:

Specifies whether the evaluation of foreign key constraints can be deferred until commit, based on the following values:

  • importedKeyInitiallyDeferred: See SQL92 for definition.

  • importedKeyInitiallyImmediate: See SQL92 for definition.

  • importedKeyNotDeferrable: See SQL92 for definition.

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schema:

A schema name pattern; "" retrieves those without a schema.

table:

A table name.

Returns: A ResultSet; each row is a foreign key column description.

See also: getImportedKeys

getExtraNameCharacters

public String getExtraNameCharacters() throws SQLException

The database may allow special characters to be used in unquoted identifiers. This method returns a String containing such characters.

Returns: The string containing the extra characters

getIdentifierQuoteString

public String getIdentifierQuoteString() throws SQLException 

This gets the string used to quote SQL identifiers.

Returns: The quoting string or a space character if the database doesn’t support identifier quoting

getImportedKeys

public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException

This gets a description of the primary key columns referenced by a table’s foreign key columns. They are ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.

The ResultSet contains primary key column descriptions. It has these columns:

PKTABLE_CAT String: The primary key table catalog being imported (may be null)

PKTABLE_SCHEM String: The primary key table schema being imported (may be null)

PKTABLE_NAME String: The primary key table name being imported

PKCOLUMN_NAME String: The primary key column name being imported

FKTABLE_CAT String: The foreign key table catalog (may be null)

FKTABLE_SCHEM String: The foreign key table schema (may be null)

FKTABLE_NAME String: The foreign key table name

FKCOLUMN_NAME String: The foreign key column name

KEY_SEQ short: The sequence number within the foreign key

UPDATE_RULE short: What happens to the foreign key when the primary key is updated, according to the following values:

  • importedKeyNoAction: Don’t allow the update of the primary key if it has been imported.

  • importedKeyCascade: Change the imported key to agree with the primary key update.

  • importedKeyRestrict: Don’t allow the update of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been updated.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been updated.

DELETE_RULE short: What happens to the foreign key when the primary key is deleted, according to the following values:

  • importedKeyNoAction: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeyCascade: Delete rows that import a deleted key.

  • importedKeyRestrict: Don’t allow the deletion of the primary key if it has been imported.

  • importedKeySetDefault: Change the imported key to the default value if its primary key has been deleted.

  • importedKeySetNull: Change the imported key to NULL if its primary key has been deleted.

FK_NAME String: The foreign key name (may be null)

PK_NAME String: The primary key name (may be null)

DEFERRABILITY short: Specifies whether the evaluation of foreign key constraints can be deferred until commit, based on the following values:

  • importedKeyInitiallyDeferred: See SQL92 for definition.

  • importedKeyInitiallyImmediate: See SQL92 for definition.

  • importedKeyNotDeferrable: See SQL92 for definition.

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schema:

A schema name pattern; "" retrieves those without a schema.

table:

A table name.

Returns: A ResultSet; each row is a primary key column description.

See also: getExportedKeys

getIndexInfo

public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException

This gets a description of a table’s indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION. The ResultSet contains index column descriptions. It has the following columns:

TABLE_CAT String:

The table catalog (may be null).

TABLE_SCHEM String:

The table schema (may be null).

TABLE_NAME String:

The table name.

NON_UNIQUE boolean:

Specifies whether index values can be nonunique; false when TYPE is tableIndexStatistic.

INDEX_QUALIFIER String:

The index catalog (may be null); null when TYPE is tableIndexStatistic.

INDEX_NAME String:

The index name; null when TYPE is tableIndexStatistic.

TYPE short:

The index type; the possible values are

  • tableIndexStatistic: This identifies table statistics that are returned in conjunction with a table’s index descriptions.

  • tableIndexClustered: This is a clustered index.

  • tableIndexHashed: This is a hashed index.

  • tableIndexOther: This index is not a hashed, clustered, or statistic-based index.

ORDINAL_POSITION short:

The column sequence number within the index; zero if TYPE is tableIndexStatistic.

COLUMN_NAME String:

The column name; null if TYPE is tableIndexStatistic.

ASC_OR_DESC String:

The column sort sequence: A for ascending and D for descending; may be null if sort sequence isn’t supported; null if TYPE is tableIndexStatistic.

CARDINALITY int:

If TYPE is tableIndexStatisic, this is the number of rows in the table; otherwise, it is the number of unique values in the index.

PAGES int:

If TYPE is tableIndexStatisic, this is the number of pages used for the table; otherwise, it is the number of pages used for the current index.

FILTER_CONDITION String:

The filter condition, if any (may be null).

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schema:

A schema name pattern; "" retrieves those without a schema.

table:

A table name.

unique:

If true, returns only indices for unique values; if false, returns all indices.

approximate:

If true, results are allowed to reflect approximate or out of data values; if false, results must be accurate.

Returns: A ResultSet; each row is an index column description.

getMaxBinaryLiteralLength

public int getMaxBinaryLiteralLength() throws SQLException

This gets the maximum number of hex characters allowed in an inline binary literal.

Returns: The maximum literal length

getMaxCatalogNameLength

public int getMaxCatalogNameLength() throws SQLException

This gets the maximum length of a catalog name.

Returns: The maximum name length in bytes

getMaxCharLiteralLength

public int getMaxCharLiteralLength() throws SQLException

This gets the maximum length for a character literal.

Returns: The maximum literal length

getMaxColumnNameLength

public int getMaxColumnNameLength() throws SQLException

This gets the maximum length allowed for a column name.

Returns: The maximum literal length

getMaxColumnsInGroupBy

public int getMaxColumnsInGroupBy() throws SQLException

This gets the maximum number of columns allowed in a GROUP BY clause.

Returns: The maximum number of columns

getMaxColumnsInIndex

public int getMaxColumnsInIndex() throws SQLException

This gets the maximum number of columns allowed in an index.

Returns: The maximum number of columns

getMaxColumnsInOrderBy

public int getMaxColumnsInOrderBy() throws SQLException 

This gets the maximum number of columns allowed in an ORDER BY clause.

Returns: The maximum number of columns

getMaxColumnsInSelect

public int getMaxColumnsInSelect() throws SQLException

This gets the maximum number of columns allowed in a SELECT list.

Returns: The maximum number of columns

getMaxColumnsInTable

public int getMaxColumnsInTable() throws SQLException

This gets the maximum number of columns allowed in a table.

Returns: The maximum number of columns

getMaxConnections

public int getMaxConnections() throws SQLException

This gets the maximum number of simultaneous active connections for this database.

Returns: The maximum number of connections

getMaxCursorNameLength

public int getMaxCursorNameLength() throws SQLException

This gets the maximum cursor name length.

Returns: The maximum cursor name length in bytes

getMaxIndexLength

public int getMaxIndexLength() throws SQLException

This gets the maximum length of an index.

Returns: The maximum index length in bytes

getMaxProcedureNameLength

public int getMaxProcedureNameLength() throws SQLException

This gets the maximum length of a procedure name.

Returns: The maximum name length in bytes

getMaxRowSize

public int getMaxRowSize() throws SQLException 

This gets the maximum length of a single row.

Returns: The maximum row size in bytes

getMaxSchemaNameLength

public int getMaxSchemaNameLength() throws SQLException

This gets the maximum length of a schema name.

Returns: The maximum name length in bytes

getMaxStatementLength

public int getMaxStatementLength() throws SQLException

This gets the maximum length of a SQL statement.

Returns: The maximum length in bytes

getMaxStatements

public int getMaxStatements() throws SQLException

This gets the maximum number of simultaneous active statements for this database.

Returns: The maximum number of statements

getMaxTableNameLength

public int getMaxTableNameLength() throws SQLException

This gets the maximum length of a table name.

Returns: The maximum name length in bytes

getMaxTablesInSelect

public int getMaxTablesInSelect() throws SQLException

This gets the maximum number of tables in a SELECT clause.

Returns: The maximum number of tables

getMaxUserNameLength

public int getMaxUserNameLength() throws SQLException

This gets the maximum length of a username.

Returns: The maximum name length in bytes

getNumericFunctions

public String getNumericFunctions() throws SQLException 

This gets a list of supported math functions.

Returns: The list with a comma as a separator

getPrimaryKeys

public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException

This gets a description of a table’s primary key columns. They are ordered by COLUMN_NAME.

The ResultSet contains column descriptions. It has these columns:

TABLE_CAT String:

The table catalog (may be null)

TABLE_SCHEM String:

The table schema (may be null)

TABLE_NAME String:

The table name

COLUMN_NAME String:

The column name

KEY_SEQ short:

The sequence number within the primary key

PK_NAME String:

The primary key name (may be null)

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schema:

A schema name pattern; "" retrieves those without a schema.

table:

A table name.

Returns: A ResultSet; each row is a primary key column description.

getProcedureColumns

public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException

This gets a description of a catalog’s stored procedure parameters and result columns. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME.

If the procedure has a return value, its description is given first. The remaining descriptions refer to the procedure’s parameters.

Each row in the ResultSet is a parameter description or column description with the following fields:

PROCEDURE_CAT String:

The procedure catalog (may be null)

PROCEDURE_SCHEM String:

The procedure schema (may be null)

PROCEDURE_NAME String:

The procedure name

COLUMN_NAME String:

The column/parameter name

COLUMN_TYPE Short:

The kind of column/parameter, according to the following values:

  • procedureColumnUnknown: The driver is unable to tell if this is an IN or OUT parameter or a return value.

  • procedureColumnIn: The IN parameter.

  • procedureColumnInOut: The INOUT parameter.

  • procedureColumnOut: The OUT parameter.

  • procedureColumnReturn: The procedure return value.

  • procedureColumnResult: The result column in ResultSet.

DATA_TYPE short:

The SQL type from java.sql.Types

TYPE_NAME String:

The SQL type name

PRECISION int:

The decimal precision (for float numbers, for example)

LENGTH int:

The length in bytes of data

SCALE short:

The scale

RADIX short:

The radix

NULLABLE short:

Specifies whether the parameter or return value can contain NULL, according to the following values:

  • procedureNoNulls: Doesn’t allow NULL values

  • procedureNullable: Allows NULL values

  • procedureNullableUnknown: Nullability unknown

REMARKS String:

A comment describing the parameter/column

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schemaPattern:

A schema name pattern; "" retrieves those without a schema.

procedureNamePattern:

A procedure name pattern.

columnNamePattern:

A column name pattern.

Returns: A ResultSet; each row is a stored procedure parameter or column description.

See also: getSearchStringEscape

getProcedures

public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException

This gets a description of stored procedures. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME.

The ResultSet contains procedure descriptions. It has these columns:

PROCEDURE_CAT String:

The procedure catalog (may be null)

PROCEDURE_SCHEM String:

The procedure schema (may be null)

PROCEDURE_NAME String:

The procedure name

REMARKS String:

An explanatory comment on the procedure

PROCEDURE_TYPE short:

The kind of procedure, according to the following values:

  • procedureResultUnknown: May return a result

  • procedureNoResult: Doesn’t return a result

  • procedureReturnsResult: Returns a result

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schemaPattern:

A schema name pattern; "" retrieves those without a schema.

procedureNamePattern:

A procedure name pattern.

Returns: A ResultSet; each row is a procedure description.

See also: getSearchStringEscape

getProcedureTerm

public String getProcedureTerm() throws SQLException

This gets the database vendor’s preferred term for procedure.

Returns: The vendor term

getSchemas

public ResultSet getSchemas() throws SQLException

This gets the schema names available in the database in use. The results are ordered by TABLE_SCHEM. The ResultSet contains one column, which is

TABLE_SCHEM String: The schema name

Returns: A ResultSet; each row has a single String column that is a schema name.

getSchemaTerm

public String getSchemaTerm() throws SQLException

This gets the database vendor’s preferred term for schema.

Returns: The vendor term

getSearchStringEscape

public String getSearchStringEscape() throws SQLException

This gets the string that can be used to escape wildcard characters such as _ or % in the string pattern style catalog search parameters. The _ character represents any single character. The % character represents any sequence of zero or more characters.

Returns: The string used to escape wildcard characters

getSQLKeywords

public String getSQLKeywords() throws SQLException

This gets a list of all SQL keywords that aren’t also SQL92 keywords supported by the database in use.

Returns: The list, comma separated

getSQLStateType

public int getSQLStateType() throws SQLException

This returns the type of SQLSTATE values for this database.

Returns: The SQLSTATE type, which is one of the following:

  • sqlStateXOpen

  • sqlStateSQL99

getStringFunctions

public String getStringFunctions() throws SQLException

This gets the list of string functions supported by the database in use.

Returns: The list, which is comma separated

getSuperTables

public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException 

This gets a description of the table hierarchies defined in a particular schema in the database.

Parameters:

catalog:

A catalog name, "" for no catalog, or null for any catalog

schemaPattern:

A schema name pattern or "" for no schema

typeNamePattern:

A type name pattern

Returns: A result set containing the description of the table hierarchies.

getSuperTypes

public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException

This gets the description of the user-defined type hierarchies defined in a particular schema in the database. Only the immediate supertype/subtype relationship is modeled.

Parameters:

catalog:

A catalog name, "" for no catalog, or null for any catalog

schemaPattern:

A schema name pattern or "" for no schema

typeNamePattern:

A type name pattern

Returns: A result set containing type descriptions

getSystemFunctions

public String getSystemFunctions() throws SQLException

This gets the list of system functions supported by the database in use.

Returns: The list, comma separated

getTablePrivileges

public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException

This returns a description of table privileges. Note that privileges may not apply to all columns of the table. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.

The ResultSet has these columns:

TABLE_CAT String:

The table catalog (may be null).

TABLE_SCHEM String:

The table schema (may be null).

TABLE_NAME String:

The table name.

GRANTOR:

The grantor of access (may be null).

GRANTEE String:

The grantee of access.

PRIVILEGE String:

The name of access (such as SELECT, INSERT, UPDATE, and REFERENCES).

IS_GRANTABLE String:

If YES, the grantee is permitted to grant to others; if NO, no grant is allowed; if null, the granting status is unknown.

Parameters:

catalog:

A catalog name; “” retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schemaPattern:

A schema name pattern; “” retrieves those without a schema.

tableNamePattern:

A table name pattern.

Returns: A ResultSet; each row is a description of a table privilege.

See also: getSearchStringEscape

getTables

public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String types[]) throws SQLException

This returns a list of user or system tables or views available in a catalog. The search criteria are catalog, schema, table name, and table type. The results are ordered by TABLE_TYPE, TABLE_SCHEM, and TABLE_NAME.

The ResultSet has these columns:

TABLE_CAT String:

The table catalog (may be null).

TABLE_SCHEM String:

The table schema (may be null).

TABLE_NAME String:

The table name.

TABLE_TYPE String:

The table type; possible types are TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.

REMARKS String:

An explanatory comment on the table.

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schemaPattern:

A schema name pattern; "" retrieves those without a schema.

tableNamePattern:

A table name pattern.

types:

A list of table types to include or null to return all types.

Returns: A ResultSet; each row is a table description.

See also: getSearchStringEscape, getTableTypes

getTableTypes

public ResultSet getTableTypes() throws SQLException

This gets all the table types available in the current database. The results are ordered by table type. The table type is

TABLE_TYPE String: The table type; possible types are TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.

Returns: A ResultSet; each row contains a table type.

getTimeDateFunctions

public String getTimeDateFunctions() throws SQLException

This gets a list of time and date functions.

Returns: A comma-separated list of time and date functions

getTypeInfo

public ResultSet getTypeInfo() throws SQLException

This gets information about all the standard SQL types supported by the database. The results are ordered by DATA_TYPE. Type definitions that are closer to their corresponding java.sql.Types are listed first. The ResultSet contains these columns:

TYPE_NAME String:

The type name

DATA_TYPE short:

The SQL data type from java.sql.Types

PRECISION int:

The maximum precision

LITERAL_PREFIX String:

The prefix used to quote a literal (may be null)

LITERAL_SUFFIX String:

The suffix used to quote a literal (may be null)

CREATE_PARAMS String:

The parameters used to create the type (may be null)

NULLABLE short:

One of these values:

  • typeNoNulls: Doesn’t allow NULL values

  • typeNullable: Allows NULL values

  • typeNullableUnknown: Nullability unknown

CASE_SENSITIVE boolean:

Specifies whether the type is case sensitive

SEARCHABLE short:

Specifies the level of support in WHERE clauses, according to the following values:

  • typePredNone: No support

  • typePredChar: Only supported with WHERE . . . LIKE

  • typePredBasic: Supported except for WHERE . . . LIKE

  • typeSearchable: Supported for all WHERE clauses

UNSIGNED_ATTRIBUTE

?

boolean:

true if unsigned

FIXED_PREC_SCALE

?

boolean:

true if the precision is fixed

AUTO_INCREMENT boolean:

true if it can be used for an auto-increment value

LOCAL_TYPE_NAME String:

The localized version of the type name (may be null)

MINIMUM_SCALE short:

The minimum scale supported

MAXIMUM_SCALE short:

The maximum scale supported

SQL_DATA_TYPE int:

Unused

SQL_DATETIME_SUB int:

Unused

NUM_PREC_RADIX int:

The radix, which is usually 2 or 10

Returns: A ResultSet; each row is a description of a SQL type supported by the database.

getUDTs

public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException

This gets a description of the user-defined types defined in a particular schema. Each type description has the following columns:

TYPE_CAT String:

The type’s catalog (may be null)

TYPE_SCHEM String:

The type’s schema (may be null)

TYPE_NAME String:

The type name

CLASS_NAME String:

The Java class name

DATA_TYPE String:

JAVA_OBJECT, STRUCT, or DISTINCT

REMARKS String:

A comment on the type

BASE_TYPE short:

The type code of the source type

Parameters:

catalog:

A catalog name, "" for no catalog, or null for any catalog

schemaPattern:

A schema pattern name, "" for no schema, or null for any schema

typeNamePattern:

A type name pattern

types:

A list of user-named types to include

Returns: A result set containing type descriptions

getURL

public String getURL() throws SQLException

This gets the URL for the current database.

Returns: The URL or null if it isn’t possible to find it

getUserName

public String getUserName() throws SQLException

This gets the database username for the current session.

Returns: The current session’s username

getVersionColumns

public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException

This returns information about the columns of a table that are automatically updated when any field in a row is updated.

The ResultSet contains these columns:

SCOPE short:

Unused

COLUMN_NAME String:

The column name

DATA_TYPE short:

The SQL data type from java.sql.Types

TYPE_NAME String:

The database type name

COLUMN_SIZE int:

The precision, such as the number of decimal digits

BUFFER_LENGTH int:

The length of the column value in bytes

DECIMAL_DIGITS short:

The scale

PSEUDO_COLUMN short:

The state of a column, according to the following values:

  • versionColumnUnknown: May or may not be a pseudocolumn

  • versionColumnNotPseudo: Isn’t a pseudocolumn

  • versionColumnPseudo: Is a pseudocolumn

Parameters:

catalog:

A catalog name; "" retrieves those without a catalog; a null means that the catalog name must be suppressed from the selection criteria.

schema:

A schema name; "" retrieves those without a schema.

table:

A table name.

Returns: A ResultSet; each row is a column description.

insertsAreDetected

public boolean insertsAreDetected(int type) throws SQLException

This checks whether a visible row insert can be detected by calling the method ResultSet.rowInserted().

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if a row insert can be detected

isCatalogAtStart

public boolean isCatalogAtStart() throws SQLException

This checks whether a catalog appears at the start of a qualified table name or at the end of a qualified table name.

Returns: true if it appears at the start

isReadOnly

public boolean isReadOnly() throws SQLException

This checks whether the database is in read-only mode.

Returns: true if the database is in read-only mode

nullPlusNonNullIsNull

public boolean nullPlusNonNullIsNull() throws SQLException

This checks whether a concatenation of NULL values is a NULL value.

Returns: true if a concatenation of NULLs is NULL

nullsAreSortedAtEnd

public boolean nullsAreSortedAtEnd() throws SQLException

This checks whether NULL values are sorted at the end regardless of sort order.

Returns: true if NULLs are sorted at the end

nullsAreSortedAtStart

public boolean nullsAreSortedAtStart() throws SQLException 

This checks whether NULL values are sorted at the start regardless of sort order.

Returns: true if NULLs are sorted at the start

nullsAreSortedHigh

public boolean nullsAreSortedHigh() throws SQLException

This checks whether NULL values appear first in the sorted results.

Returns: true if NULLs are sorted high

nullsAreSortedLow

public boolean nullsAreSortedLow() throws SQLException

This checks whether NULL values appear last in the sorted results.

Returns: true if NULLs are sorted low

othersDeletesAreVisible

public boolean othersDeletesAreVisible(int type) throws SQLException

This indicates whether deletes made by others are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if deletes made by others are visible

othersInsertsAreVisible

public boolean othersInsertsAreVisible(int type) throws SQLException

This indicates whether inserts made by others are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if inserts made by others are visible

othersUpdatesAreVisible

public boolean othersUpdatesAreVisible(int type) throws SQLException

This indicates whether updates made by others are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if updates made by others are visible

ownDeletesAreVisible

public boolean ownDeletesAreVisible(int type) throws SQLException

This checks whether a result set’s own deletes are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if a result set’s own deletes are visible

ownInsertsAreVisible

public boolean ownInsertsAreVisible(int type) throws SQLException

This checks whether a result set’s own inserts are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if a result set’s own inserts are visible

ownUpdatesAreVisible

public boolean ownUpdatesAreVisible(int type) throws SQLException

This checks whether a result set’s own updates are visible.

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if a result set’s own updates are visible

storesLowerCaseIdentifiers

public boolean storesLowerCaseIdentifiers() throws SQLException

This checks whether the database automatically converts unquoted SQL identifiers to lowercase.

Returns: true if the database stores lowercase identifiers

storesLowerCaseQuotedIdentifiers

public boolean storesLowerCaseQuotedIdentifiers() throws SQLException

This checks whether the database automatically converts quoted SQL identifiers to lowercase.

Returns: true if the database stores lowercase quoted identifiers

storesMixedCaseIdentifiers

public boolean storesMixedCaseIdentifiers() throws SQLException

This checks whether the database stores mixed-case unquoted identifiers.

Returns: true if the database stores mixed-case identifiers

storesMixedCaseQuotedIdentifiers

public boolean storesMixedCaseQuotedIdentifiers() throws SQLException

This checks whether the database stores mixed-case quoted identifiers.

Returns: true if the database stores mixed-case quoted identifiers

storesUpperCaseIdentifiers

public boolean storesUpperCaseIdentifiers() throws SQLException

This checks whether the database automatically converts unquoted SQL identifiers to uppercase.

Returns: true if the database stores uppercase identifiers

storesUpperCaseQuotedIdentifiers

public boolean storesUpperCaseQuotedIdentifiers() throws SQLException

This checks whether the database automatically converts quoted SQL identifiers to uppercase.

Returns: true if the database stores uppercase quoted identifiers

supportsAlterTableWithAddColumn

public boolean supportsAlterTableWithAddColumn() throws SQLException 

This checks whether an ALTER TABLE clause can be used to add a column.

Returns: true if ALTER TABLE can be used

supportsAlterTableWithDropColumn

public boolean supportsAlterTableWithDropColumn() throws SQLException

This checks whether an ALTER TABLE clause can be used to drop a column.

Returns: true if ALTER TABLE can be used

supportsANSI92EntryLevelSQL

public boolean supportsANSI92EntryLevelSQL() throws SQLException

This checks whether the ANSI92 Entry Level SQL grammar is supported. Must be true for all JDBC-compliant drivers.

Returns: true if ANSI92 Entry Level SQL is supported

supportsANSI92FullSQL

public boolean supportsANSI92FullSQL() throws SQLException

This checks whether the ANSI92 Full SQL grammar is supported.

Returns: true if ANSI92 Full SQL is supported

supportsANSI92IntermediateSQL

public boolean supportsANSI92IntermediateSQL() throws SQLException

This checks whether the ANSI92 Intermediate SQL grammar is supported.

Returns: true if ANSI92 Intermediate SQL is supported

supportsBatchUpdates

public boolean supportsBatchUpdates() throws SQLException

This checks whether the driver supports batch updates.

Returns: true if batch updates are supported

supportsCatalogsInDataManipulation

public boolean supportsCatalogsInDataManipulation() throws SQLException

This checks whether a catalog name can be used in a DML statement.

Returns: true if catalog names can be used

supportsCatalogsInProcedureCalls

public boolean supportsCatalogsInProcedureCalls() throws SQLException 

This checks whether a catalog name can be used in a procedure call statement.

Returns: true if catalog names can be used

supportsCatalogsInTableDefinitions

public boolean supportsCatalogsInTableDefinitions() throws SQLException

This checks whether a catalog name can be used in a table definition (DDL) statement.

Returns: true if catalog names can be used

supportsCatalogsInIndexDefinitions

public boolean supportsCatalogsInIndexDefinitions() throws SQLException

This checks whether a catalog name can be used in an index definition (DDL) statement.

Returns: true if catalog names can be used

supportsCatalogsInPrivilegeDefinitions

public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException

This checks whether a catalog name can be used in a privilege definition statement.

Returns: true if catalog names can be used

supportsColumnAliasing

public boolean supportsColumnAliasing() throws SQLException

This checks whether column aliasing is supported to provide names to computed columns with the AS SQL keyword.

Returns: true if column aliasing is supported

supportsConvert

public boolean supportsConvert() throws SQLException

This checks whether the CONVERT function is supported between SQL types.

Returns: true if CONVERT is supported

supportsConvert

public boolean supportsConvert(int fromType, int toType) throws SQLException

This checks whether the CONVERT function is supported between the given SQL types.

Parameters:

fromType:

The type to convert from

toType:

The type to convert to

Returns: true if CONVERT is supported

supportsCorrelatedSubqueries

public boolean supportsCorrelatedSubqueries() throws SQLException

This checks whether correlated subqueries are supported.

Returns: true if correlated subqueries are supported

supportsCoreSQLGrammar

public boolean supportsCoreSQLGrammar() throws SQLException

This checks whether the ODBC Core SQL grammar is supported.

Returns: true if ODBC Core SQL is supported

supportsDataDefinitionAndDataManipulationTransactions

public boolean supportsDataDefinitionAndDataManipulation Transactions() throws SQLException

This checks whether both data definition (DDL) and data manipulation (DML) statements are supported within a transaction.

Returns: true if DDL and DML are supported

supportsDataManipulationTransactionsOnly

public boolean supportsDataManipulationTransactionsOnly() throws SQLException

This checks whether only data manipulation statements are supported within a transaction.

Returns: true if only DML is supported

supportsDifferentTableCorrelationNames

public boolean supportsDifferentTableCorrelationNames() throws SQLException

This checks whether table correlation names are supported and if they must be different from the table names.

Returns: true if so

supportsExpressionsInOrderBy

public boolean supportsExpressionsInOrderBy() throws SQLException

This checks whether expressions are supported in ORDER BY lists.

Returns: true if expressions are supported

supportsExtendedSQLGrammar

public boolean supportsExtendedSQLGrammar() throws SQLException

This checks whether the ODBC Extended SQL grammar is supported.

Returns: true if ODBC Extended SQL is supported

supportsFullOuterJoins

public boolean supportsFullOuterJoins() throws SQLException

This checks whether full nested outer joins are supported.

Returns: true if full outer joins are supported

supportsGetGeneratedKeys

public boolean supportsGetGeneratedKeys() throws SQLException

This checks whether auto-generated keys can be retrieved after a statement is executed.

Returns: true if auto-generated keys can be retrieved

supportsGroupBy

public boolean supportsGroupBy() throws SQLException

This checks whether the SQL GROUP BY clause is supported.

Returns: true if GROUP BY is supported

supportsGroupByUnrelated

public boolean supportsGroupByUnrelated() throws SQLException

This checks whether a GROUP BY clause can use columns that aren’t in the SELECT statement.

Returns: true if GROUP BY can use unrelated columns

supportsGroupByBeyondSelect

public boolean supportsGroupByBeyondSelect() throws SQLException

This checks whether a GROUP BY clause can add columns that aren’t in the SELECT statement, provided it specifies all the columns in the SELECT clause.

Returns: true if so

supportsIntegrityEnhancementFacility

public boolean supportsIntegrityEnhancementFacility() throws SQLException

This checks whether the SQL Integrity Enhancement Facility is supported.

Returns: true if the SQL Integrity Enhancement Facility is supported

supportsLikeEscapeClause

public boolean supportsLikeEscapeClause() throws SQLException

This checks whether the escape character is supported in LIKE clauses.

Returns: true if LIKE supports the escape character

supportsLimitedOuterJoins

public boolean supportsLimitedOuterJoins() throws SQLException

This checks whether there is limited support for outer joins.

Returns: true if limited outer joins are supported

supportsMinimumSQLGrammar

public boolean supportsMinimumSQLGrammar() throws SQLException

This checks whether the ODBC Minimum SQL grammar is supported. Must be true for all JDBC-compliant drivers.

Returns: true if ODBC Minimum SQL is supported

supportsMixedCaseIdentifiers

public boolean supportsMixedCaseIdentifiers() throws SQLException

This checks whether the database supports unquoted mixed-case identifiers.

Returns: true if the database supports mixed-case identifiers

supportsMixedCaseQuotedIdentifiers

public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException

This checks whether the database supports mixed-case quoted identifiers.

Returns: true if the database supports mixed-case quoted identifiers

supportsMultipleOpenResults

public boolean supportsMultipleOpenResults() throws SQLException

This checks whether multiple ResultSet objects can be returned from a CallableStatement simultaneously.

Returns: true if multiple ResultSets can be returned

supportsMultipleResultSets

public boolean supportsMultipleResultSets() throws SQLException 

This checks whether multiple ResultSets returned after a single execute are supported.

Returns: true if multiple ResultSets are supported

supportsMultipleTransactions

public boolean supportsMultipleTransactions() throws SQLException

This checks whether multiple transactions are supported simultaneously on different connections.

Returns: true if multiple transactions are supported

supportsNamedParameters

public boolean supportsNamedParameters() throws SQLException

This checks whether named parameters to callable statements are supported.

Returns: true if named parameters are supported

supportsNonNullableColumns

public boolean supportsNonNullableColumns() throws SQLException

This checks whether columns can be defined as non-nullable.

Returns: true if non-nullable columns are supported

supportsOpenCursorsAcrossCommit

public boolean supportsOpenCursorsAcrossCommit() throws SQLException

This checks whether cursors can remain open across commits.

Returns: true if open cursors across commits are supported

See also: disableAutoClose

supportsOpenCursorsAcrossRollback

public boolean supportsOpenCursorsAcrossRollback() throws SQLException

This checks whether cursors can remain open across rollbacks.

Returns: true if open cursors across rollbacks are supported

See also: disableAutoClose

supportsOpenStatementsAcrossCommit

public boolean supportsOpenStatementsAcrossCommit() throws SQLException

This checks whether statements can remain open across commits.

Returns: true if open statements across commits are supported

See also: disableAutoClose

supportsOpenStatementsAcrossRollback

public boolean supportsOpenStatementsAcrossRollback() throws SQLException

This checks whether statements can remain open across rollbacks.

Returns: true if open statements across rollbacks are supported

See also: disableAutoClose

supportsOrderByUnrelated

public boolean supportsOrderByUnrelated() throws SQLException

This checks whether an ORDER BY clause can use columns that aren’t in the SELECT statement.

Returns: true if ORDER BY can use unrelated columns

supportsOuterJoins

public boolean supportsOuterJoins() throws SQLException

This checks whether the database supports outer joins.

Returns: true if outer joins are supported

supportsPositionedDelete

public boolean supportsPositionedDelete() throws SQLException

This checks whether the database supports positioned DELETE.

Returns: true if positioned DELETE is supported

supportsPositionedUpdate

public boolean supportsPositionedUpdate() throws SQLException

This checks whether the database supports positioned UPDATE.

Returns: true if positioned UPDATE is supported

supportsResultSetConcurrency

public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException

This checks whether the database supports the concurrency type with the given result set type.

Parameters:

type:

Defined in java.sql.ResultSet

concurrency:

The type defined in java.sql.ResultSet

Returns: true if the concurrency type is supported

supportResultSetHoldability

public boolean supportResultSetHoldability(int holdability) throws SQLException

This checks whether the database supports the given result set holdability.

Parameters:

holdability:

Defined in java.sql.ResultSet

Returns: true if the holdability is supported

supportsResultSetType

public boolean supportsResultSetType(int type) throws SQLException

This checks whether the database supports the given result set type.

Parameters:

type:

Defined in java.sql.ResultSet

Returns: true if the result set type is supported

supportsSavepoints

public boolean supportsSavepoints() throws SQLException

This checks whether savepoints are supported in transactions.

Returns: true if savepoints are supported

supportsSchemasInDataManipulation

public boolean supportsSchemasInDataManipulation() throws SQLException

This checks whether a schema name can be used in a data manipulation (DML) statement.

Returns: true if schemas are supported

supportsSchemasInIndexDefinitions

public boolean supportsSchemasInIndexDefinitions() throws SQLException

This checks whether a schema name can be used in an index definition (DDL) statement.

Returns: true if schemas are supported

supportsSchemasInPrivilegeDefinitions

public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException

This checks whether a schema name can be used in a privilege definition statement.

Returns: true if schemas are supported

supportsSchemasInProcedureCalls

public boolean supportsSchemasInProcedureCalls() throws SQLException

This checks whether a schema name can be used in a procedure call statement.

Returns: true if schemas are supported

supportsSchemasInTableDefinitions

public boolean supportsSchemasInTableDefinitions() throws SQLException

This checks whether a schema name can be used in a table definition (DDL) statement.

Returns: true if schemas are supported

supportsSelectForUpdate

public boolean supportsSelectForUpdate() throws SQLException

This checks whether the database supports SELECT for UPDATE clauses.

Returns: true if SELECT for UPDATE is supported

supportsStoredProcedures

public boolean supportsStoredProcedures() throws SQLException

This checks whether the stored procedure escape syntax can be used to call stored procedures.

Returns: true if the stored procedure escape syntax is supported

supportsSubqueriesInComparisons

public boolean supportsSubqueriesInComparisons() throws SQLException

This checks whether subqueries are supported in comparison expressions.

Returns: true if subqueries in comparisons are supported

supportsSubqueriesInExists

public boolean supportsSubqueriesInExists() throws SQLException

This checks whether subqueries are supported in exists expressions.

Returns: true if subqueries in exists expressions are supported

supportsSubqueriesInIns

public boolean supportsSubqueriesInIns() throws SQLException

This checks whether subqueries are supported in IN statements.

Returns: true if subqueries in INs are supported

supportsSubqueriesInQuantifieds

public boolean supportsSubqueriesInQuantifieds() throws SQLException

This checks whether subqueries are supported in quantified expressions.

Returns: true if subqueries in quantified expressions are supported

supportsTableCorrelationNames

public boolean supportsTableCorrelationNames() throws SQLException

This checks whether table correlation names are supported.

Returns: true if table correlation names are supported

supportsTransactions

public boolean supportsTransactions() throws SQLException

This checks whether the database supports transactions.

Returns: true if transactions are supported

supportsTransactionIsolationLevel

public boolean supportsTransactionIsolationLevel(int level) throws SQLException

This checks whether the database supports the given transaction isolation level.

Parameters:

level:

The values are defined in java.sql.Connection.

Returns: true if the transaction isolation level is supported

See also: Connection

supportsUnion

public boolean supportsUnion() throws SQLException

This checks whether the database supports SQL UNION.

Returns: true if UNION is supported

supportsUnionAll

public boolean supportsUnionAll() throws SQLException

This checks whether the database supports SQL UNION ALL.

Returns: true if UNION ALL is supported

updatesAreDetected

public boolean updatesAreDetected(int type) throws SQLException 

This checks whether a visible row update can be detected by calling the method ResultSet.rowUpdated().

Parameters:

type:

One of the following ResultSet types:

  • ResultSet.TYPE_FORWARD_ONLY

  • ResultSet.TYPE_SCROLL_INSENSITIVE

  • ResultSet.TYPE_SCROLL_SENSITIVE

Returns: true if updates can be detected

usesLocalFilePerTable

public boolean usesLocalFilePerTable() throws SQLException

This checks whether the database uses a file for each table.

Returns: true if the database uses a local file for each table

usesLocalFiles

public boolean usesLocalFiles() throws SQLException

This checks whether the database stores tables in a local file.

Returns: true if a local file is used



JDBC 3. 0. JAVA Database Connectivity
JDBC 3: Java Database Connectivity
ISBN: 0764548751
EAN: 2147483647
Year: 2002
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net