APIdia Launch Partner
Top Description Fields Methods
java.sql

public Interface DatabaseMetaData

extends Wrapper

Comprehensive information about the database as a whole.

This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBC technology ("JDBC driver") that is used with it. Different relational DBMSs often support different features, implement features in different ways, and use different data types. In addition, a driver may implement a feature on top of what the DBMS offers. Information returned by methods in this interface applies to the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation, the term "database" is used generically to refer to both the driver and DBMS.

A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example, a tool might use the method getTypeInfo to find out what data types can be used in a CREATE TABLE statement. Or a user might call the method supportsCorrelatedSubqueries to see if it is possible to use a correlated subquery or supportsBatchUpdates to see if it is possible to use batch updates.

Some DatabaseMetaData methods return lists of information in the form of ResultSet objects. Regular ResultSet methods, such as getString and getInt, can be used to retrieve the data from these ResultSet objects. If a given form of metadata is not available, an empty ResultSet will be returned. Additional columns beyond the columns defined to be returned by the ResultSet object for a given method can be defined by the JDBC driver vendor and must be accessed by their column label.

Some DatabaseMetaData methods take arguments that are String patterns. These arguments all have names such as fooPattern. Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null, that argument's criterion will be dropped from the search.

Since
1.1

Field Summary

Modifier and TypeField and Description
public static final short
attributeNoNulls

Indicates that NULL values might not be allowed.

public static final short
attributeNullable

Indicates that NULL values are definitely allowed.

public static final short
attributeNullableUnknown

Indicates that whether NULL values are allowed is not known.

public static final int
bestRowNotPseudo

Indicates that the best row identifier is NOT a pseudo column.

public static final int
bestRowPseudo

Indicates that the best row identifier is a pseudo column.

public static final int
bestRowSession

Indicates that the scope of the best row identifier is the remainder of the current session.

public static final int
bestRowTemporary

Indicates that the scope of the best row identifier is very temporary, lasting only while the row is being used.

public static final int
bestRowTransaction

Indicates that the scope of the best row identifier is the remainder of the current transaction.

public static final int
bestRowUnknown

Indicates that the best row identifier may or may not be a pseudo column.

public static final int
columnNoNulls

Indicates that the column might not allow NULL values.

public static final int
columnNullable

Indicates that the column definitely allows NULL values.

public static final int
columnNullableUnknown

Indicates that the nullability of columns is unknown.

public static final int
functionColumnIn

Indicates that the parameter or column is an IN parameter.

public static final int
functionColumnInOut

Indicates that the parameter or column is an INOUT parameter.

public static final int
functionColumnOut

Indicates that the parameter or column is an OUT parameter.

public static final int
functionColumnResult

Indicates that the parameter or column is a column in a result set.

public static final int
functionColumnUnknown

Indicates that type of the parameter or column is unknown.

public static final int
functionNoNulls

Indicates that NULL values are not allowed.

public static final int
functionNoTable

Indicates that the function does not return a table.

public static final int
functionNullable

Indicates that NULL values are allowed.

public static final int
functionNullableUnknown

Indicates that whether NULL values are allowed is unknown.

public static final int
functionResultUnknown

Indicates that it is not known whether the function returns a result or a table.

public static final int
functionReturn

Indicates that the parameter or column is a return value.

public static final int
functionReturnsTable

Indicates that the function returns a table.

public static final int
importedKeyCascade

For the column UPDATE_RULE, indicates that when the primary key is updated, the foreign key (imported key) is changed to agree with it.

public static final int
importedKeyInitiallyDeferred

Indicates deferrability.

public static final int
importedKeyInitiallyImmediate

Indicates deferrability.

public static final int
importedKeyNoAction

For the columns UPDATE_RULE and DELETE_RULE, indicates that if the primary key has been imported, it cannot be updated or deleted.

public static final int
importedKeyNotDeferrable

Indicates deferrability.

public static final int
importedKeyRestrict

For the column UPDATE_RULE, indicates that a primary key may not be updated if it has been imported by another table as a foreign key.

public static final int
importedKeySetDefault

For the columns UPDATE_RULE and DELETE_RULE, indicates that if the primary key is updated or deleted, the foreign key (imported key) is set to the default value.

public static final int
importedKeySetNull

For the columns UPDATE_RULE and DELETE_RULE, indicates that when the primary key is updated or deleted, the foreign key (imported key) is changed to NULL.

public static final int
procedureColumnIn

Indicates that the column stores IN parameters.

public static final int
procedureColumnInOut

Indicates that the column stores INOUT parameters.

public static final int
procedureColumnOut

Indicates that the column stores OUT parameters.

public static final int
procedureColumnResult

Indicates that the column stores results.

public static final int
procedureColumnReturn

Indicates that the column stores return values.

public static final int
procedureColumnUnknown

Indicates that type of the column is unknown.

public static final int
procedureNoNulls

Indicates that NULL values are not allowed.

public static final int
procedureNoResult

Indicates that the procedure does not return a result.

public static final int
procedureNullable

Indicates that NULL values are allowed.

public static final int
procedureNullableUnknown

Indicates that whether NULL values are allowed is unknown.

public static final int
procedureResultUnknown

Indicates that it is not known whether the procedure returns a result.

public static final int
procedureReturnsResult

Indicates that the procedure returns a result.

public static final int
sqlStateSQL

A possible return value for the method DatabaseMetaData.getSQLStateType which is used to indicate whether the value returned by the method SQLException.getSQLState is an SQLSTATE value.

public static final int
sqlStateSQL99

A possible return value for the method DatabaseMetaData.getSQLStateType which is used to indicate whether the value returned by the method SQLException.getSQLState is an SQL99 SQLSTATE value.

public static final int
sqlStateXOpen

A possible return value for the method DatabaseMetaData.getSQLStateType which is used to indicate whether the value returned by the method SQLException.getSQLState is an X/Open (now know as Open Group) SQL CLI SQLSTATE value.

public static final short
tableIndexClustered

Indicates that this table index is a clustered index.

public static final short
tableIndexHashed

Indicates that this table index is a hashed index.

public static final short
tableIndexOther

Indicates that this table index is not a clustered index, a hashed index, or table statistics; it is something other than these.

public static final short
tableIndexStatistic

Indicates that this column contains table statistics that are returned in conjunction with a table's index descriptions.

public static final int
typeNoNulls

Indicates that a NULL value is NOT allowed for this data type.

public static final int
typeNullable

Indicates that a NULL value is allowed for this data type.

public static final int
typeNullableUnknown

Indicates that it is not known whether a NULL value is allowed for this data type.

public static final int
typePredBasic

Indicates that the data type can be only be used in WHERE search clauses that do not use LIKE predicates.

public static final int
typePredChar

Indicates that the data type can be only be used in WHERE search clauses that use LIKE predicates.

public static final int
typePredNone

Indicates that WHERE search clauses are not supported for this type.

public static final int
typeSearchable

Indicates that all WHERE search clauses can be based on this type.

public static final int
versionColumnNotPseudo

Indicates that this version column is NOT a pseudo column.

public static final int
versionColumnPseudo

Indicates that this version column is a pseudo column.

public static final int
versionColumnUnknown

Indicates that this version column may or may not be a pseudo column.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if so; false otherwise
allProceduresAreCallable
()

Retrieves whether the current user can call all the procedures returned by the method getProcedures.

public boolean

Returns:

true if so; false otherwise
allTablesAreSelectable
()

Retrieves whether the current user can use all the tables returned by the method getTables in a SELECT statement.

public boolean

Returns:

true if so; false otherwise
autoCommitFailureClosesAllResultSets
()

Retrieves whether a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable.

public boolean

Returns:

true if so; false otherwise
dataDefinitionCausesTransactionCommit
()

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

public boolean

Returns:

true if so; false otherwise
dataDefinitionIgnoredInTransactions
()

Retrieves whether this database ignores a data definition statement within a transaction.

public boolean

Returns:

true if deletes are detected by the given result set type; false otherwise
deletesAreDetected
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether or not a visible row delete can be detected by calling the method ResultSet.rowDeleted.

public boolean

Returns:

true if so; false otherwise
doesMaxRowSizeIncludeBlobs
()

Retrieves whether the return value for the method getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY.

public boolean

Returns:

true if so; false otherwise
generatedKeyAlwaysReturned
()

Retrieves whether a generated key will always be returned if the column name(s) or index(es) specified for the auto generated key column(s) are valid and the statement succeeds.

public ResultSet

Returns:

a ResultSet object in which each row is an attribute description
getAttributes
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a type name pattern; must match the type name as it is stored in the database
typeNamePattern
,
String
an attribute name pattern; must match the attribute name as it is declared in the database
attributeNamePattern
)

Retrieves a description of the given attribute of the given type for a user-defined type (UDT) that is available in the given schema and catalog.

public ResultSet

Returns:

ResultSet - each row is a column description
getBestRowIdentifier
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in the database
table
,
int
the scope of interest; use same values as SCOPE
scope
,
boolean
include columns that are nullable.
nullable
)

Retrieves a description of a table's optimal set of columns that uniquely identifies a row.

public ResultSet

Returns:

a ResultSet object in which each row has a single String column that is a catalog name
getCatalogs
()

Retrieves the catalog names available in this database.

public String

Returns:

the separator string
getCatalogSeparator
()

Retrieves the String that this database uses as the separator between a catalog and table name.

public String

Returns:

the vendor term for "catalog"
getCatalogTerm
()

Retrieves the database vendor's preferred term for "catalog".

public ResultSet

Returns:

A ResultSet object; each row is a supported client info property
getClientInfoProperties
()

Retrieves a list of the client info properties that the driver supports.

public ResultSet

Returns:

ResultSet - each row is a column privilege description
getColumnPrivileges
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in the database
table
,
String
a column name pattern; must match the column name as it is stored in the database
columnNamePattern
)

Retrieves a description of the access rights for a table's columns.

public ResultSet

Returns:

ResultSet - each row is a column description
getColumns
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a table name pattern; must match the table name as it is stored in the database
tableNamePattern
,
String
a column name pattern; must match the column name as it is stored in the database
columnNamePattern
)

Retrieves a description of table columns available in the specified catalog.

public Connection

Returns:

the connection that produced this metadata object
getConnection
()

Retrieves the connection that produced this metadata object.

public ResultSet

Returns:

ResultSet - each row is a foreign key column description
getCrossReference
(String
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
parentCatalog
,
String
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
parentSchema
,
String
the name of the table that exports the key; must match the table name as it is stored in the database
parentTable
,
String
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
foreignCatalog
,
String
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
foreignSchema
,
String
the name of the table that imports the key; must match the table name as it is stored in the database
foreignTable
)

Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table).

public int

Returns:

the underlying database's major version
getDatabaseMajorVersion
()

Retrieves the major version number of the underlying database.

public int

Returns:

underlying database's minor version
getDatabaseMinorVersion
()

Retrieves the minor version number of the underlying database.

public String

Returns:

database product name
getDatabaseProductName
()

Retrieves the name of this database product.

public String

Returns:

database version number
getDatabaseProductVersion
()

Retrieves the version number of this database product.

public int

Returns:

the default isolation level
getDefaultTransactionIsolation
()

Retrieves this database's default transaction isolation level.

public int

Returns:

JDBC driver major version
getDriverMajorVersion
()

Retrieves this JDBC driver's major version number.

public int

Returns:

JDBC driver minor version number
getDriverMinorVersion
()

Retrieves this JDBC driver's minor version number.

public String

Returns:

JDBC driver name
getDriverName
()

Retrieves the name of this JDBC driver.

public String

Returns:

JDBC driver version
getDriverVersion
()

Retrieves the version number of this JDBC driver as a String.

public ResultSet

Returns:

a ResultSet object in which each row is a foreign key column description
getExportedKeys
(String
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
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in this database
table
)

Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).

public String

Returns:

the string containing the extra characters
getExtraNameCharacters
()

Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _).

public ResultSet

Returns:

ResultSet - each row describes a user function parameter, column or return type
getFunctionColumns
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a procedure name pattern; must match the function name as it is stored in the database
functionNamePattern
,
String
a parameter name pattern; must match the parameter or column name as it is stored in the database
columnNamePattern
)

Retrieves a description of the given catalog's system or user function parameters and return type.

public ResultSet

Returns:

ResultSet - each row is a function description
getFunctions
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a function name pattern; must match the function name as it is stored in the database
functionNamePattern
)

Retrieves a description of the system and user functions available in the given catalog.

public String

Returns:

the quoting string or a space if quoting is not supported
getIdentifierQuoteString
()

Retrieves the string used to quote SQL identifiers.

public ResultSet

Returns:

ResultSet - each row is a primary key column description
getImportedKeys
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in the database
table
)

Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns (the primary keys imported by a table).

public ResultSet

Returns:

ResultSet - each row is an index column description
getIndexInfo
(String
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
catalog
,
String
a schema name; must match the schema name as it is stored in this database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
schema
,
String
a table name; must match the table name as it is stored in this database
table
,
boolean
when true, return only indices for unique values; when false, return indices regardless of whether unique or not
unique
,
boolean
when true, result is allowed to reflect approximate or out of data values; when false, results are requested to be accurate
approximate
)

Retrieves a description of the given table's indices and statistics.

public int

Returns:

JDBC version major number
getJDBCMajorVersion
()

Retrieves the major JDBC version number for this driver.

public int

Returns:

JDBC version minor number
getJDBCMinorVersion
()

Retrieves the minor JDBC version number for this driver.

public int

Returns:

max the maximum length (in hex characters) for a binary literal; a result of zero means that there is no limit or the limit is not known
getMaxBinaryLiteralLength
()

Retrieves the maximum number of hex characters this database allows in an inline binary literal.

public int

Returns:

the maximum number of characters allowed in a catalog name; a result of zero means that there is no limit or the limit is not known
getMaxCatalogNameLength
()

Retrieves the maximum number of characters that this database allows in a catalog name.

public int

Returns:

the maximum number of characters allowed for a character literal; a result of zero means that there is no limit or the limit is not known
getMaxCharLiteralLength
()

Retrieves the maximum number of characters this database allows for a character literal.

public int

Returns:

the maximum number of characters allowed for a column name; a result of zero means that there is no limit or the limit is not known
getMaxColumnNameLength
()

Retrieves the maximum number of characters this database allows for a column name.

public int

Returns:

the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
getMaxColumnsInGroupBy
()

Retrieves the maximum number of columns this database allows in a GROUP BY clause.

public int

Returns:

the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
getMaxColumnsInIndex
()

Retrieves the maximum number of columns this database allows in an index.

public int

Returns:

the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
getMaxColumnsInOrderBy
()

Retrieves the maximum number of columns this database allows in an ORDER BY clause.

public int

Returns:

the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
getMaxColumnsInSelect
()

Retrieves the maximum number of columns this database allows in a SELECT list.

public int

Returns:

the maximum number of columns allowed; a result of zero means that there is no limit or the limit is not known
getMaxColumnsInTable
()

Retrieves the maximum number of columns this database allows in a table.

public int

Returns:

the maximum number of active connections possible at one time; a result of zero means that there is no limit or the limit is not known
getMaxConnections
()

Retrieves the maximum number of concurrent connections to this database that are possible.

public int

Returns:

the maximum number of characters allowed in a cursor name; a result of zero means that there is no limit or the limit is not known
getMaxCursorNameLength
()

Retrieves the maximum number of characters that this database allows in a cursor name.

public int

Returns:

the maximum number of bytes allowed; this limit includes the composite of all the constituent parts of the index; a result of zero means that there is no limit or the limit is not known
getMaxIndexLength
()

Retrieves the maximum number of bytes this database allows for an index, including all of the parts of the index.

public default long

Returns:

the maximum number of bytes allowed; a result of zero means that there is no limit or the limit is not known
getMaxLogicalLobSize
()

Retrieves the maximum number of bytes this database allows for the logical size for a LOB.

public int

Returns:

the maximum number of characters allowed in a procedure name; a result of zero means that there is no limit or the limit is not known
getMaxProcedureNameLength
()

Retrieves the maximum number of characters that this database allows in a procedure name.

public int

Returns:

the maximum number of bytes allowed for a row; a result of zero means that there is no limit or the limit is not known
getMaxRowSize
()

Retrieves the maximum number of bytes this database allows in a single row.

public int

Returns:

the maximum number of characters allowed in a schema name; a result of zero means that there is no limit or the limit is not known
getMaxSchemaNameLength
()

Retrieves the maximum number of characters that this database allows in a schema name.

public int

Returns:

the maximum number of characters allowed for an SQL statement; a result of zero means that there is no limit or the limit is not known
getMaxStatementLength
()

Retrieves the maximum number of characters this database allows in an SQL statement.

public int

Returns:

the maximum number of statements that can be open at one time; a result of zero means that there is no limit or the limit is not known
getMaxStatements
()

Retrieves the maximum number of active statements to this database that can be open at the same time.

public int

Returns:

the maximum number of characters allowed for a table name; a result of zero means that there is no limit or the limit is not known
getMaxTableNameLength
()

Retrieves the maximum number of characters this database allows in a table name.

public int

Returns:

the maximum number of tables allowed in a SELECT statement; a result of zero means that there is no limit or the limit is not known
getMaxTablesInSelect
()

Retrieves the maximum number of tables this database allows in a SELECT statement.

public int

Returns:

the maximum number of characters allowed for a user name; a result of zero means that there is no limit or the limit is not known
getMaxUserNameLength
()

Retrieves the maximum number of characters this database allows in a user name.

public String

Returns:

the list of math functions supported by this database
getNumericFunctions
()

Retrieves a comma-separated list of math functions available with this database.

public ResultSet

Returns:

ResultSet - each row is a primary key column description
getPrimaryKeys
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in the database
table
)

Retrieves a description of the given table's primary key columns.

public ResultSet

Returns:

ResultSet - each row describes a stored procedure parameter or column
getProcedureColumns
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a procedure name pattern; must match the procedure name as it is stored in the database
procedureNamePattern
,
String
a column name pattern; must match the column name as it is stored in the database
columnNamePattern
)

Retrieves a description of the given catalog's stored procedure parameter and result columns.

public ResultSet

Returns:

ResultSet - each row is a procedure description
getProcedures
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a procedure name pattern; must match the procedure name as it is stored in the database
procedureNamePattern
)

Retrieves a description of the stored procedures available in the given catalog.

public String

Returns:

the vendor term for "procedure"
getProcedureTerm
()

Retrieves the database vendor's preferred term for "procedure".

public ResultSet

Returns:

ResultSet - each row is a column description
getPseudoColumns
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a table name pattern; must match the table name as it is stored in the database
tableNamePattern
,
String
a column name pattern; must match the column name as it is stored in the database
columnNamePattern
)

Retrieves a description of the pseudo or hidden columns available in a given table within the specified catalog and schema.

public int

Returns:

the default holdability; either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
getResultSetHoldability
()

Retrieves this database's default holdability for ResultSet objects.

public RowIdLifetime

Returns:

the status indicating the lifetime of a RowId
getRowIdLifetime
()

Indicates whether this data source supports the SQL ROWID type, and the lifetime for which a RowId object remains valid.

public ResultSet

Returns:

a ResultSet object in which each row is a schema description
getSchemas
()

Retrieves the schema names available in this database.

public ResultSet

Returns:

a ResultSet object in which each row is a schema description
getSchemas
(String
a catalog name; must match the catalog name as it is stored in the database;"" retrieves those without a catalog; null means catalog name should not be used to narrow down the search.
catalog
,
String
a schema name; must match the schema name as it is stored in the database; null means schema name should not be used to narrow down the search.
schemaPattern
)

Retrieves the schema names available in this database.

public String

Returns:

the vendor term for "schema"
getSchemaTerm
()

Retrieves the database vendor's preferred term for "schema".

public String

Returns:

the string used to escape wildcard characters
getSearchStringEscape
()

Retrieves the string that can be used to escape wildcard characters.

public String

Returns:

the list of this database's keywords that are not also SQL:2003 keywords
getSQLKeywords
()

Retrieves a comma-separated list of all of this database's SQL keywords that are NOT also SQL:2003 keywords.

public int

Returns:

the type of SQLSTATE; one of: sqlStateXOpen or sqlStateSQL
getSQLStateType
()

Indicates whether the SQLSTATE returned by SQLException.getSQLState is X/Open (now known as Open Group) SQL CLI or SQL:2003.

public String

Returns:

the list of string functions supported by this database
getStringFunctions
()

Retrieves a comma-separated list of string functions available with this database.

public ResultSet

Returns:

a ResultSet object in which each row is a type description
getSuperTables
(String
a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
catalog
,
String
a schema name pattern; "" retrieves those without a schema
schemaPattern
,
String
a table name pattern; may be a fully-qualified name
tableNamePattern
)

Retrieves a description of the table hierarchies defined in a particular schema in this database.

public ResultSet

Returns:

a ResultSet object in which a row gives information about the designated UDT
getSuperTypes
(String
a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
catalog
,
String
a schema name pattern; "" retrieves those without a schema
schemaPattern
,
String
a UDT name pattern; may be a fully-qualified name
typeNamePattern
)

Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database.

public String

Returns:

a list of system functions supported by this database
getSystemFunctions
()

Retrieves a comma-separated list of system functions available with this database.

public ResultSet

Returns:

ResultSet - each row is a table privilege description
getTablePrivileges
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a table name pattern; must match the table name as it is stored in the database
tableNamePattern
)

Retrieves a description of the access rights for each table available in a catalog.

public ResultSet

Returns:

ResultSet - each row is a table description
getTables
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema name pattern; 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
schemaPattern
,
String
a table name pattern; must match the table name as it is stored in the database
tableNamePattern
,
String[]
a list of table types, which must be from the list of table types returned from getTableTypes, to include; null returns all types
types
)

Retrieves a description of the tables available in the given catalog.

public ResultSet

Returns:

a ResultSet object in which each row has a single String column that is a table type
getTableTypes
()

Retrieves the table types available in this database.

public String

Returns:

the list of time and date functions supported by this database
getTimeDateFunctions
()

Retrieves a comma-separated list of the time and date functions available with this database.

public ResultSet

Returns:

a ResultSet object in which each row is an SQL type description
getTypeInfo
()

Retrieves a description of all the data types supported by this database.

public ResultSet

Returns:

ResultSet object in which each row describes a UDT
getUDTs
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
a schema pattern 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
schemaPattern
,
String
a type name pattern; must match the type name as it is stored in the database; may be a fully qualified name
typeNamePattern
,
int[]
a list of user-defined types (JAVA_OBJECT, STRUCT, or DISTINCT) to include; null returns all types
types
)

Retrieves a description of the user-defined types (UDTs) defined in a particular schema.

public String

Returns:

the URL for this DBMS or null if it cannot be generated
getURL
()

Retrieves the URL for this DBMS.

public String

Returns:

the database user name
getUserName
()

Retrieves the user name as known to this database.

public ResultSet

Returns:

a ResultSet object in which each row is a column description
getVersionColumns
(String
a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
catalog
,
String
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
schema
,
String
a table name; must match the table name as it is stored in the database
table
)

Retrieves a description of a table's columns that are automatically updated when any value in a row is updated.

public boolean

Returns:

true if changes are detected by the specified result set type; false otherwise
insertsAreDetected
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether or not a visible row insert can be detected by calling the method ResultSet.rowInserted.

public boolean

Returns:

true if the catalog name appears at the beginning of a fully qualified table name; false otherwise
isCatalogAtStart
()

Retrieves whether a catalog appears at the start of a fully qualified table name.

public boolean

Returns:

true if so; false otherwise
isReadOnly
()

Retrieves whether this database is in read-only mode.

public boolean

Returns:

true if updates are made to a copy of the LOB; false if updates are made directly to the LOB
locatorsUpdateCopy
()

Indicates whether updates made to a LOB are made on a copy or directly to the LOB.

public boolean

Returns:

true if so; false otherwise
nullPlusNonNullIsNull
()

Retrieves whether this database supports concatenations between NULL and non-NULL values being NULL.

public boolean

Returns:

true if so; false otherwise
nullsAreSortedAtEnd
()

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

public boolean

Returns:

true if so; false otherwise
nullsAreSortedAtStart
()

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

public boolean

Returns:

true if so; false otherwise
nullsAreSortedHigh
()

Retrieves whether NULL values are sorted high.

public boolean

Returns:

true if so; false otherwise
nullsAreSortedLow
()

Retrieves whether NULL values are sorted low.

public boolean

Returns:

true if deletes made by others are visible for the given result set type; false otherwise
othersDeletesAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether deletes made by others are visible.

public boolean

Returns:

true if inserts made by others are visible for the given result set type; false otherwise
othersInsertsAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether inserts made by others are visible.

public boolean

Returns:

true if updates made by others are visible for the given result set type; false otherwise
othersUpdatesAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether updates made by others are visible.

public boolean

Returns:

true if deletes are visible for the given result set type; false otherwise
ownDeletesAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether a result set's own deletes are visible.

public boolean

Returns:

true if inserts are visible for the given result set type; false otherwise
ownInsertsAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether a result set's own inserts are visible.

public boolean

Returns:

true if updates are visible for the given result set type; false otherwise
ownUpdatesAreVisible
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether for the given type of ResultSet object, the result set's own updates are visible.

public boolean

Returns:

true if so; false otherwise
storesLowerCaseIdentifiers
()

Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in lower case.

public boolean

Returns:

true if so; false otherwise
storesLowerCaseQuotedIdentifiers
()

Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in lower case.

public boolean

Returns:

true if so; false otherwise
storesMixedCaseIdentifiers
()

Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.

public boolean

Returns:

true if so; false otherwise
storesMixedCaseQuotedIdentifiers
()

Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in mixed case.

public boolean

Returns:

true if so; false otherwise
storesUpperCaseIdentifiers
()

Retrieves whether this database treats mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.

public boolean

Returns:

true if so; false otherwise
storesUpperCaseQuotedIdentifiers
()

Retrieves whether this database treats mixed case quoted SQL identifiers as case insensitive and stores them in upper case.

public boolean

Returns:

true if so; false otherwise
supportsAlterTableWithAddColumn
()

Retrieves whether this database supports ALTER TABLE with add column.

public boolean

Returns:

true if so; false otherwise
supportsAlterTableWithDropColumn
()

Retrieves whether this database supports ALTER TABLE with drop column.

public boolean

Returns:

true if so; false otherwise
supportsANSI92EntryLevelSQL
()

Retrieves whether this database supports the ANSI92 entry level SQL grammar.

public boolean

Returns:

true if so; false otherwise
supportsANSI92FullSQL
()

Retrieves whether this database supports the ANSI92 full SQL grammar supported.

public boolean

Returns:

true if so; false otherwise
supportsANSI92IntermediateSQL
()

Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.

public boolean

Returns:

true if this database supports batch updates; false otherwise
supportsBatchUpdates
()

Retrieves whether this database supports batch updates.

public boolean

Returns:

true if so; false otherwise
supportsCatalogsInDataManipulation
()

Retrieves whether a catalog name can be used in a data manipulation statement.

public boolean

Returns:

true if so; false otherwise
supportsCatalogsInIndexDefinitions
()

Retrieves whether a catalog name can be used in an index definition statement.

public boolean

Returns:

true if so; false otherwise
supportsCatalogsInPrivilegeDefinitions
()

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

public boolean

Returns:

true if so; false otherwise
supportsCatalogsInProcedureCalls
()

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

public boolean

Returns:

true if so; false otherwise
supportsCatalogsInTableDefinitions
()

Retrieves whether a catalog name can be used in a table definition statement.

public boolean

Returns:

true if so; false otherwise
supportsColumnAliasing
()

Retrieves whether this database supports column aliasing.

public boolean

Returns:

true if so; false otherwise
supportsConvert
()

Retrieves whether this database supports the JDBC scalar function CONVERT for the conversion of one JDBC type to another.

public boolean

Returns:

true if so; false otherwise
supportsConvert
(int
the type to convert from; one of the type codes from the class java.sql.Types
fromType
,
int
the type to convert to; one of the type codes from the class java.sql.Types
toType
)

Retrieves whether this database supports the JDBC scalar function CONVERT for conversions between the JDBC types fromType and toType.

public boolean

Returns:

true if so; false otherwise
supportsCoreSQLGrammar
()

Retrieves whether this database supports the ODBC Core SQL grammar.

public boolean

Returns:

true if so; false otherwise
supportsCorrelatedSubqueries
()

Retrieves whether this database supports correlated subqueries.

public boolean

Returns:

true if so; false otherwise
supportsDataDefinitionAndDataManipulationTransactions
()

Retrieves whether this database supports both data definition and data manipulation statements within a transaction.

public boolean

Returns:

true if so; false otherwise
supportsDataManipulationTransactionsOnly
()

Retrieves whether this database supports only data manipulation statements within a transaction.

public boolean

Returns:

true if so; false otherwise
supportsDifferentTableCorrelationNames
()

Retrieves whether, when table correlation names are supported, they are restricted to being different from the names of the tables.

public boolean

Returns:

true if so; false otherwise
supportsExpressionsInOrderBy
()

Retrieves whether this database supports expressions in ORDER BY lists.

public boolean

Returns:

true if so; false otherwise
supportsExtendedSQLGrammar
()

Retrieves whether this database supports the ODBC Extended SQL grammar.

public boolean

Returns:

true if so; false otherwise
supportsFullOuterJoins
()

Retrieves whether this database supports full nested outer joins.

public boolean

Returns:

true if auto-generated keys can be retrieved after a statement has executed; false otherwise

If true is returned, the JDBC driver must support the returning of auto-generated keys for at least SQL INSERT statements

supportsGetGeneratedKeys
()

Retrieves whether auto-generated keys can be retrieved after a statement has been executed

public boolean

Returns:

true if so; false otherwise
supportsGroupBy
()

Retrieves whether this database supports some form of GROUP BY clause.

public boolean

Returns:

true if so; false otherwise
supportsGroupByBeyondSelect
()

Retrieves whether this database supports using columns not included in the SELECT statement in a GROUP BY clause provided that all of the columns in the SELECT statement are included in the GROUP BY clause.

public boolean

Returns:

true if so; false otherwise
supportsGroupByUnrelated
()

Retrieves whether this database supports using a column that is not in the SELECT statement in a GROUP BY clause.

public boolean

Returns:

true if so; false otherwise
supportsIntegrityEnhancementFacility
()

Retrieves whether this database supports the SQL Integrity Enhancement Facility.

public boolean

Returns:

true if so; false otherwise
supportsLikeEscapeClause
()

Retrieves whether this database supports specifying a LIKE escape clause.

public boolean

Returns:

true if so; false otherwise
supportsLimitedOuterJoins
()

Retrieves whether this database provides limited support for outer joins.

public boolean

Returns:

true if so; false otherwise
supportsMinimumSQLGrammar
()

Retrieves whether this database supports the ODBC Minimum SQL grammar.

public boolean

Returns:

true if so; false otherwise
supportsMixedCaseIdentifiers
()

Retrieves whether this database treats mixed case unquoted SQL identifiers as case sensitive and as a result stores them in mixed case.

public boolean

Returns:

true if so; false otherwise
supportsMixedCaseQuotedIdentifiers
()

Retrieves whether this database treats mixed case quoted SQL identifiers as case sensitive and as a result stores them in mixed case.

public boolean

Returns:

true if a CallableStatement object can return multiple ResultSet objects simultaneously; false otherwise
supportsMultipleOpenResults
()

Retrieves whether it is possible to have multiple ResultSet objects returned from a CallableStatement object simultaneously.

public boolean

Returns:

true if so; false otherwise
supportsMultipleResultSets
()

Retrieves whether this database supports getting multiple ResultSet objects from a single call to the method execute.

public boolean

Returns:

true if so; false otherwise
supportsMultipleTransactions
()

Retrieves whether this database allows having multiple transactions open at once (on different connections).

public boolean

Returns:

true if named parameters are supported; false otherwise
supportsNamedParameters
()

Retrieves whether this database supports named parameters to callable statements.

public boolean

Returns:

true if so; false otherwise
supportsNonNullableColumns
()

Retrieves whether columns in this database may be defined as non-nullable.

public boolean

Returns:

true if cursors always remain open; false if they might not remain open
supportsOpenCursorsAcrossCommit
()

Retrieves whether this database supports keeping cursors open across commits.

public boolean

Returns:

true if cursors always remain open; false if they might not remain open
supportsOpenCursorsAcrossRollback
()

Retrieves whether this database supports keeping cursors open across rollbacks.

public boolean

Returns:

true if statements always remain open; false if they might not remain open
supportsOpenStatementsAcrossCommit
()

Retrieves whether this database supports keeping statements open across commits.

public boolean

Returns:

true if statements always remain open; false if they might not remain open
supportsOpenStatementsAcrossRollback
()

Retrieves whether this database supports keeping statements open across rollbacks.

public boolean

Returns:

true if so; false otherwise
supportsOrderByUnrelated
()

Retrieves whether this database supports using a column that is not in the SELECT statement in an ORDER BY clause.

public boolean

Returns:

true if so; false otherwise
supportsOuterJoins
()

Retrieves whether this database supports some form of outer join.

public boolean

Returns:

true if so; false otherwise
supportsPositionedDelete
()

Retrieves whether this database supports positioned DELETE statements.

public boolean

Returns:

true if so; false otherwise
supportsPositionedUpdate
()

Retrieves whether this database supports positioned UPDATE statements.

public default boolean

Returns:

true if this database supports REF CURSOR; false otherwise
supportsRefCursors
()

Retrieves whether this database supports REF CURSOR.

public boolean

Returns:

true if so; false otherwise
supportsResultSetConcurrency
(int
defined in java.sql.ResultSet
type
,
int
type defined in java.sql.ResultSet
concurrency
)

Retrieves whether this database supports the given concurrency type in combination with the given result set type.

public boolean

Returns:

true if so; false otherwise
supportsResultSetHoldability
(int
one of the following constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
holdability
)

Retrieves whether this database supports the given result set holdability.

public boolean

Returns:

true if so; false otherwise
supportsResultSetType
(int
defined in java.sql.ResultSet
type
)

Retrieves whether this database supports the given result set type.

public boolean

Returns:

true if savepoints are supported; false otherwise
supportsSavepoints
()

Retrieves whether this database supports savepoints.

public boolean

Returns:

true if so; false otherwise
supportsSchemasInDataManipulation
()

Retrieves whether a schema name can be used in a data manipulation statement.

public boolean

Returns:

true if so; false otherwise
supportsSchemasInIndexDefinitions
()

Retrieves whether a schema name can be used in an index definition statement.

public boolean

Returns:

true if so; false otherwise
supportsSchemasInPrivilegeDefinitions
()

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

public boolean

Returns:

true if so; false otherwise
supportsSchemasInProcedureCalls
()

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

public boolean

Returns:

true if so; false otherwise
supportsSchemasInTableDefinitions
()

Retrieves whether a schema name can be used in a table definition statement.

public boolean

Returns:

true if so; false otherwise
supportsSelectForUpdate
()

Retrieves whether this database supports SELECT FOR UPDATE statements.

public default boolean

Returns:

true if this database supports sharding; false otherwise
supportsSharding
()

Retrieves whether this database supports sharding.

public boolean

Returns:

true if so; false otherwise
supportsStatementPooling
()

Retrieves whether this database supports statement pooling.

public boolean

Returns:

true if so; false otherwise
supportsStoredFunctionsUsingCallSyntax
()

Retrieves whether this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.

public boolean

Returns:

true if so; false otherwise
supportsStoredProcedures
()

Retrieves whether this database supports stored procedure calls that use the stored procedure escape syntax.

public boolean

Returns:

true if so; false otherwise
supportsSubqueriesInComparisons
()

Retrieves whether this database supports subqueries in comparison expressions.

public boolean

Returns:

true if so; false otherwise
supportsSubqueriesInExists
()

Retrieves whether this database supports subqueries in EXISTS expressions.

public boolean

Returns:

true if so; false otherwise
supportsSubqueriesInIns
()

Retrieves whether this database supports subqueries in IN expressions.

public boolean

Returns:

true if so; false otherwise
supportsSubqueriesInQuantifieds
()

Retrieves whether this database supports subqueries in quantified expressions.

public boolean

Returns:

true if so; false otherwise
supportsTableCorrelationNames
()

Retrieves whether this database supports table correlation names.

public boolean

Returns:

true if so; false otherwise
supportsTransactionIsolationLevel
(int
one of the transaction isolation levels defined in java.sql.Connection
level
)

Retrieves whether this database supports the given transaction isolation level.

public boolean

Returns:

true if transactions are supported; false otherwise
supportsTransactions
()

Retrieves whether this database supports transactions.

public boolean

Returns:

true if so; false otherwise
supportsUnion
()

Retrieves whether this database supports SQL UNION.

public boolean

Returns:

true if so; false otherwise
supportsUnionAll
()

Retrieves whether this database supports SQL UNION ALL.

public boolean

Returns:

true if changes are detected by the result set type; false otherwise
updatesAreDetected
(int
the ResultSet type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
type
)

Retrieves whether or not a visible row update can be detected by calling the method ResultSet.rowUpdated.

public boolean

Returns:

true if this database uses a local file for each table; false otherwise
usesLocalFilePerTable
()

Retrieves whether this database uses a file for each table.

public boolean

Returns:

true if so; false otherwise
usesLocalFiles
()

Retrieves whether this database stores tables in a local file.

Inherited from java.sql.Wrapper:
isWrapperForunwrap