Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

DatabaseMetaData

implements Wrapper
java.sql.DatabaseMetaData

Class Overview

An interface which provides comprehensive information about the database management system and its supported features.

This interface is implemented by JDBC driver vendors in order to provide information about the underlying database capabilities in association with the JDBC driver.

Some of the methods in this interface take string parameters which are patterns. Within these string patterns, '%' and '_' characters have special meanings. '%' means "match any substring of 0 or more characters". '_' means "match any character". Only metadata entries that match the pattern are returned. If such a search pattern string is set to null , that argument's criteria are dropped from the search.

Summary

Constants
short attributeNoNulls States that it may not be permitted to store NULL values.
short attributeNullable States that NULL values are definitely permitted.
short attributeNullableUnknown States that whether NULL values are permitted is unknown.
int bestRowNotPseudo States the best row identifier is NOT a pseudo column.
int bestRowPseudo States that the best row identifier is a pseudo column.
int bestRowSession States that the remainder of the current session is used as the scope for the best row identifier.
int bestRowTemporary States that best row identifier scope lasts only while the row is being used.
int bestRowTransaction States that the remainder of the current transaction is used as the scope for the best row identifier.
int bestRowUnknown States that the best row identifier may or may not be a pseudo column.
int columnNoNulls States that the column must not allow NULL values.
int columnNullable States that the column definitely allows NULL values.
int columnNullableUnknown States that it is unknown whether the columns may be nulled.
int functionColumnIn States that the parameter or column is an IN parameter
int functionColumnInOut States that the parameter or column is an INOUT parameter
int functionColumnOut States that the parameter or column is an OUT parameter
int functionColumnResult States that the parameter or column is a column in a result set
int functionColumnUnknown States that the parameter of function is unknown
int functionNoNulls States that NULL values are not allowed
int functionNoTable States that the function does not return a table
int functionNullable States that NULL values are allowed
int functionNullableUnknown States that whether NULL values are allowed is unknown
int functionResultUnknown States that it is not known whether the function returns a result or a table
int functionReturn States that the parameter or column is a return value
int functionReturnsTable States that the function returns a table.
int importedKeyCascade For the column UPDATE_RULE , states that when the primary key is updated, the foreign key (imported key) is changed accordingly.
int importedKeyInitiallyDeferred States that the evaluation of foreign key constraints is deferred (delayed until commit).
int importedKeyInitiallyImmediate States that the evaluation of foreign key constraint is IMMEDIATE .
int importedKeyNoAction For the columns UPDATE_RULE and DELETE_RULE , states that if the primary key has been imported, it cannot be updated or deleted.
int importedKeyNotDeferrable States that the evaluation of foreign key constraint must not be DEFERRED .
int importedKeyRestrict States that a primary key must not be updated when imported as a foreign key by some other table.
int importedKeySetDefault States that when the primary key is modified (updated or deleted) the foreign (imported) key is changed to its default value.
int importedKeySetNull States that when the primary key is modified (updated or deleted) the foreign (imported) key is changed to NULL .
int procedureColumnIn States that the column stores IN type parameters.
int procedureColumnInOut States that this column stores INOUT type parameters.
int procedureColumnOut States that this column stores OUT type parameters.
int procedureColumnResult States that the column stores results.
int procedureColumnReturn States that the column stores return values.
int procedureColumnUnknown States that type of the column is unknown.
int procedureNoNulls States that NULL values are not permitted.
int procedureNoResult States that the procedure does not return a result.
int procedureNullable States that NULL values are permitted.
int procedureNullableUnknown States that it is unknown whether NULL values are permitted.
int procedureResultUnknown States that it is unknown whether or not the procedure returns a result.
int procedureReturnsResult States that the procedure returns a result.
int sqlStateSQL States that the method DatabaseMetaData.getSQLStateType may returns an SQLSTATE value or not.
int sqlStateSQL99 States that the value is an SQL99 SQLSTATE value.
int sqlStateXOpen States that the value is an SQL CLI SQLSTATE value as defined by the X/Open standard.
short tableIndexClustered States that this table index is a clustered index.
short tableIndexHashed States that this table index is a hashed index.
short tableIndexOther States this table's index is neither a clustered index, not a hashed index, and not a table statistics index; i.e.
short tableIndexStatistic States this column has the table's statistics, and that it is returned in conjunction with the table's index description.
int typeNoNulls States that a NULL value is NOT permitted for this data type.
int typeNullable States that a NULL value is permitted for this data type.
int typeNullableUnknown States that it is unknown if a NULL value is permitted for this data type.
int typePredBasic States that this column shall not be used for WHERE statements with a LIKE clause.
int typePredChar States that this column can only be used in a WHERE...LIKE statement.
int typePredNone States that this column does not support searches.
int typeSearchable States that the column is searchable.
int versionColumnNotPseudo States that the version column is known to be not a pseudo column.
int versionColumnPseudo States that this version column is known to be a pseudo column.
int versionColumnUnknown States that the version column may be a pseudo column or not.
Public Methods
abstract boolean allProceduresAreCallable ()
Returns whether all procedures returned by getProcedures(String, String, String) can be called by the current user.
abstract boolean allTablesAreSelectable ()
Returns whether all the tables returned by getTables can be used by the current user in a SELECT statement.
abstract boolean autoCommitFailureClosesAllResultSets ()
Determine if a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable
abstract boolean dataDefinitionCausesTransactionCommit ()
Returns whether a data definition statement in a transaction forces a commit of the transaction.
abstract boolean dataDefinitionIgnoredInTransactions ()
Returns whether the database ignores data definition statements within a transaction.
abstract boolean deletesAreDetected (int type)
Returns whether a visible row delete can be detected by calling rowDeleted() .
abstract boolean doesMaxRowSizeIncludeBlobs ()
Returns whether the return value of getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY .
abstract ResultSet getAttributes ( String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)
Returns a ResultSet describing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog.
abstract ResultSet getBestRowIdentifier ( String catalog, String schema, String table, int scope, boolean nullable)
Returns a list of a table's optimal set of columns that uniquely identify the rows.
abstract String getCatalogSeparator ()
Returns the separator that this database uses between a catalog name and table name.
abstract String getCatalogTerm ()
Returns the term that the database vendor prefers term for "catalog".
abstract ResultSet getCatalogs ()
Returns the set of catalog names available in this database.
abstract ResultSet getClientInfoProperties ()
Returns a list of the client info properties of the driver.
abstract ResultSet getColumnPrivileges ( String catalog, String schema, String table, String columnNamePattern)
Returns a description of access rights for a table's columns.
abstract ResultSet getColumns ( String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
Returns a description of table columns available in a specified catalog.
abstract Connection getConnection ()
Returns the database connection that created this metadata.
abstract ResultSet getCrossReference ( String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)
Returns a list of foreign key columns in a given foreign key table that reference the primary key columns of a supplied primary key table.
abstract int getDatabaseMajorVersion ()
Returns the major version number of the database software.
abstract int getDatabaseMinorVersion ()
Returns the minor version number of the database software.
abstract String getDatabaseProductName ()
Returns the name of the database software.
abstract String getDatabaseProductVersion ()
Returns the version number of this database software.
abstract int getDefaultTransactionIsolation ()
Returns the default transaction isolation level for this database.
abstract int getDriverMajorVersion ()
Returns the JDBC driver's major version number.
abstract int getDriverMinorVersion ()
Returns the JDBC driver's minor version number.
abstract String getDriverName ()
Returns the name of this JDBC driver.
abstract String getDriverVersion ()
Returns the version number of this JDBC driver.
abstract ResultSet getExportedKeys ( String catalog, String schema, String table)
Returns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).
abstract String getExtraNameCharacters ()
Returns a string of characters that may be used in unquoted identifier names.
abstract ResultSet getFunctionColumns ( String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)
Returns a description according to the given catalog's system or user function parameters and return type.
abstract ResultSet getFunctions ( String catalog, String schemaPattern, String functionNamePattern)
Returns a description of the system and user functions available according to the given catalog.
abstract String getIdentifierQuoteString ()
Returns the string used to quote SQL identifiers.
abstract ResultSet getImportedKeys ( String catalog, String schema, String table)
Returns a list columns in a table that are both primary keys and referenced by the table's foreign key columns (that is, the primary keys imported by a table).
abstract ResultSet getIndexInfo ( String catalog, String schema, String table, boolean unique, boolean approximate)
Returns a list of indices and statistics for a specified table.
abstract int getJDBCMajorVersion ()
Returns this driver's major JDBC version number.
abstract int getJDBCMinorVersion ()
Returns the minor JDBC version number for this driver.
abstract int getMaxBinaryLiteralLength ()
Get the maximum number of hex characters in an in-line binary literal for this database.
abstract int getMaxCatalogNameLength ()
Returns the maximum size of a catalog name in this database.
abstract int getMaxCharLiteralLength ()
Returns the maximum size for a character literal in this database.
abstract int getMaxColumnNameLength ()
Returns the maximum size for a Column name for this database.
abstract int getMaxColumnsInGroupBy ()
Get the maximum number of columns in a GROUP BY clause for this database.
abstract int getMaxColumnsInIndex ()
Returns the maximum number of columns in an Index for this database.
abstract int getMaxColumnsInOrderBy ()
Returns the maximum number of columns in an ORDER BY clause for this database.
abstract int getMaxColumnsInSelect ()
Returns the maximum number of columns in a SELECT list for this database.
abstract int getMaxColumnsInTable ()
Returns the maximum number of columns in a table for this database.
abstract int getMaxConnections ()
Returns the database's maximum number of concurrent connections.
abstract int getMaxCursorNameLength ()
Returns the maximum length of a cursor name for this database.
abstract int getMaxIndexLength ()
Returns the maximum length in bytes for an Index for this database.
abstract int getMaxProcedureNameLength ()
Returns the maximum number of characters for a procedure name in this database.
abstract int getMaxRowSize ()
Returns the maximum number of bytes within a single row for this database.
abstract int getMaxSchemaNameLength ()
Returns the maximum number of characters in a schema name for this database.
abstract int getMaxStatementLength ()
Returns the maximum number of characters in an SQL statement for this database.
abstract int getMaxStatements ()
Get the maximum number of simultaneously open active statements for this database.
abstract int getMaxTableNameLength ()
Returns the maximum size for a table name in the database.
abstract int getMaxTablesInSelect ()
Returns the maximum number of tables permitted in a SELECT statement for the database.
abstract int getMaxUserNameLength ()
Returns the maximum number of characters in a user name for the database.
abstract String getNumericFunctions ()
Returns a list of the math functions available with this database.
abstract ResultSet getPrimaryKeys ( String catalog, String schema, String table)
Returns a list of the primary key columns of a specified table.
abstract ResultSet getProcedureColumns ( String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)
Returns a list of parameter and result columns for the stored procedures belonging to a specified catalog.
abstract String getProcedureTerm ()
Returns the database vendor's preferred name for "procedure".
abstract ResultSet getProcedures ( String catalog, String schemaPattern, String procedureNamePattern)
Returns a list of the stored procedures available in a specified catalog.
abstract int getResultSetHoldability ()
Returns the result set's default holdability.
abstract RowIdLifetime getRowIdLifetime ()
Returns the lifetime for which a RowId object remains valid if this data source supports the SQL ROWID type
abstract String getSQLKeywords ()
Returns a list of all the SQL keywords that are NOT also SQL92 keywords for the database.
abstract int getSQLStateType ()
States the type of SQLState value returned by SQLException.getSQLState .
abstract String getSchemaTerm ()
Returns the database vendor's preferred term for "schema".
abstract ResultSet getSchemas ( String catalog, String schemaPattern)
Returns the schema names ordered by TABLE_CATALOG and TABLE_SCHEMA.
abstract ResultSet getSchemas ()
Returns a list of the schema names in the database.
abstract String getSearchStringEscape ()
Returns the string that is used to escape wildcard characters.
abstract String getStringFunctions ()
Returns a list of string functions available with the database.
abstract ResultSet getSuperTables ( String catalog, String schemaPattern, String tableNamePattern)
Returns a listing of the hierarchies of tables in a specified schema in the database.
abstract ResultSet getSuperTypes ( String catalog, String schemaPattern, String typeNamePattern)
Returns the User Defined Type (UDT) hierarchies for a given schema.
abstract String getSystemFunctions ()
Returns a list of system functions available with the database.
abstract ResultSet getTablePrivileges ( String catalog, String schemaPattern, String tableNamePattern)
Returns a description of access rights for each table present in a catalog.
abstract ResultSet getTableTypes ()
Returns a list of table types supported by the database.
abstract ResultSet getTables ( String catalog, String schemaPattern, String tableNamePattern, String[] types)
Returns a description of the tables in a specified catalog.
abstract String getTimeDateFunctions ()
Returns a list of time and date functions available for the database.
abstract ResultSet getTypeInfo ()
Get a list of the standard SQL types supported by this database.
abstract ResultSet getUDTs ( String catalog, String schemaPattern, String typeNamePattern, int[] types)
Returns a description of the User Defined Types (UDTs) defined in a given schema, which includes the types DISTINCT , STRUCT and JAVA_OBJECT .
abstract String getURL ()
Returns the URL for this database.
abstract String getUserName ()
Determine the user name as known by the database.
abstract ResultSet getVersionColumns ( String catalog, String schema, String table)
Returns which of a table's columns are automatically updated when any value in a row is updated.
abstract boolean insertsAreDetected (int type)
Determines whether a visible row insert can be detected by calling ResultSet.rowInserted .
abstract boolean isCatalogAtStart ()
Determine whether a fully qualified table name is prefixed or suffixed to a fully qualified table name.
abstract boolean isReadOnly ()
Determines whether the database is in read-only mode.
abstract boolean locatorsUpdateCopy ()
Determines whether updates are made to a copy of, or directly on, Large Objects ( LOB s).
abstract boolean nullPlusNonNullIsNull ()
Determines whether the database handles concatenations between NULL and non- NULL values by producing a NULL output.
abstract boolean nullsAreSortedAtEnd ()
Determines whether NULL values are always sorted to the end of sorted results regardless of requested sort order.
abstract boolean nullsAreSortedAtStart ()
Determines whether NULL values are always sorted at the start of the sorted list, irrespective of the sort order.
abstract boolean nullsAreSortedHigh ()
Determines whether NULL values are sorted high - i.e.
abstract boolean nullsAreSortedLow ()
Determines whether NULL values are sorted low - i.e.
abstract boolean othersDeletesAreVisible (int type)
Determines whether deletes made by others are visible, for a specified ResultSet type.
abstract boolean othersInsertsAreVisible (int type)
Determines whether inserts made by others are visible, for a specified ResultSet type.
abstract boolean othersUpdatesAreVisible (int type)
Determines whether updates made by others are visible, for a specified ResultSet type.
abstract boolean ownDeletesAreVisible (int type)
Determines whether a ResultSet can see its own deletes, for a specified ResultSet type.
abstract boolean ownInsertsAreVisible (int type)
Determines whether a ResultSet can see its own inserts, for a specified ResultSet type.
abstract boolean ownUpdatesAreVisible (int type)
Determines whether a ResultSet can see its own updates, for a specified ResultSet type.
abstract boolean storesLowerCaseIdentifiers ()
Determines whether the database treats SQL identifiers that are in mixed case (and unquoted) as case insensitive.
abstract boolean storesLowerCaseQuotedIdentifiers ()
Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in lower case.
abstract boolean storesMixedCaseIdentifiers ()
Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.
abstract boolean storesMixedCaseQuotedIdentifiers ()
Determines whether the database considers identifiers as case insensitive if they are mixed case quoted SQL.
abstract boolean storesUpperCaseIdentifiers ()
Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.
abstract boolean storesUpperCaseQuotedIdentifiers ()
Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in upper case.
abstract boolean supportsANSI92EntryLevelSQL ()
Determines whether the database supports the ANSI92 entry level SQL grammar.
abstract boolean supportsANSI92FullSQL ()
Determines whether the database supports the ANSI92 full SQL grammar.
abstract boolean supportsANSI92IntermediateSQL ()
Determines whether the database supports the ANSI92 intermediate SQL Grammar.
abstract boolean supportsAlterTableWithAddColumn ()
Determines whether the database supports ALTER TABLE operation with ADD COLUMN .
abstract boolean supportsAlterTableWithDropColumn ()
Determines whether the database supports ALTER TABLE operation with DROP COLUMN .
abstract boolean supportsBatchUpdates ()
Determines whether the database supports batch updates.
abstract boolean supportsCatalogsInDataManipulation ()
Determines whether catalog names may be used in data manipulation statements.
abstract boolean supportsCatalogsInIndexDefinitions ()
Determines whether catalog names can be used in index definition statements.
abstract boolean supportsCatalogsInPrivilegeDefinitions ()
Determines whether catalog names can be used in privilege definition statements.
abstract boolean supportsCatalogsInProcedureCalls ()
Determines whether catalog names can be used in procedure call statements.
abstract boolean supportsCatalogsInTableDefinitions ()
Determines whether catalog names may be used in table definition statements.
abstract boolean supportsColumnAliasing ()
Determines whether the database supports column aliasing.
abstract boolean supportsConvert (int fromType, int toType)
Determines whether the database supports CONVERT operation for two supplied SQL types.
abstract boolean supportsConvert ()
Determines whether the database supports the CONVERT operation between SQL types.
abstract boolean supportsCoreSQLGrammar ()
Determines whether the database supports the Core SQL Grammar for ODBC.
abstract boolean supportsCorrelatedSubqueries ()
Determines whether the database supports correlated sub-queries.
abstract boolean supportsDataDefinitionAndDataManipulationTransactions ()
Determines whether the database allows both data definition and data manipulation statements inside a transaction.
abstract boolean supportsDataManipulationTransactionsOnly ()
Determines whether the database only allows data manipulation statements inside a transaction.
abstract boolean supportsDifferentTableCorrelationNames ()
Determines whether table correlation names are required to be different from the names of the tables, when they are supported.
abstract boolean supportsExpressionsInOrderBy ()
Determines whether expressions in ORDER BY lists are supported.
abstract boolean supportsExtendedSQLGrammar ()
Determines whether the Extended SQL Grammar for ODBC is supported.
abstract boolean supportsFullOuterJoins ()
Determines whether the database supports full nested outer joins.
abstract boolean supportsGetGeneratedKeys ()
Determines whether auto generated keys can be returned when a statement executes.
abstract boolean supportsGroupBy ()
Determines whether the database supports GROUP BY clauses.
abstract boolean supportsGroupByBeyondSelect ()
Determines whether the database supports using a column name in a GROUP BY clause not included in the SELECT statement as long as all of the columns in the SELECT statement are used in the GROUP BY clause.
abstract boolean supportsGroupByUnrelated ()
Determines whether the database supports using a column name in a GROUP BY clause that is not in the SELECT statement.
abstract boolean supportsIntegrityEnhancementFacility ()
Determines whether the database supports SQL Integrity Enhancement Facility.
abstract boolean supportsLikeEscapeClause ()
Determines whether the database supports a LIKE escape clause.
abstract boolean supportsLimitedOuterJoins ()
Determines whether the database provides limited support for outer join operations.
abstract boolean supportsMinimumSQLGrammar ()
Determines whether the database supports Minimum SQL Grammar for ODBC.
abstract boolean supportsMixedCaseIdentifiers ()
Determines whether the database treats mixed case unquoted SQL identifiers as case sensitive storing them in mixed case.
abstract boolean supportsMixedCaseQuotedIdentifiers ()
Determines whether the database considers mixed case quoted SQL identifiers as case sensitive, storing them in mixed case.
abstract boolean supportsMultipleOpenResults ()
Determines whether it is possible for a single CallableStatement to return multiple ResultSet s simultaneously.
abstract boolean supportsMultipleResultSets ()
Determines whether retrieving multiple ResultSet s from a single call to the execute method is supported.
abstract boolean supportsMultipleTransactions ()
Determines whether multiple simultaneous transactions on different connections are supported.
abstract boolean supportsNamedParameters ()
Determines whether callable statements with named parameters is supported.
abstract boolean supportsNonNullableColumns ()
Determines whether columns in the database can be defined as non-nullable.
abstract boolean supportsOpenCursorsAcrossCommit ()
Determines whether keeping cursors open across commit operations is supported.
abstract boolean supportsOpenCursorsAcrossRollback ()
Determines whether the database can keep cursors open across rollback operations.
abstract boolean supportsOpenStatementsAcrossCommit ()
Determines whether keeping statements open across commit operations is supported.
abstract boolean supportsOpenStatementsAcrossRollback ()
Determines whether keeping statements open across rollback operations is supported.
abstract boolean supportsOrderByUnrelated ()
Determines whether using a column in an ORDER BY clause that is not in the SELECT statement is supported.
abstract boolean supportsOuterJoins ()
Determines whether outer join operations are supported.
abstract boolean supportsPositionedDelete ()
Determines whether positioned DELETE statements are supported.
abstract boolean supportsPositionedUpdate ()
Determines whether positioned UPDATE statements are supported.
abstract boolean supportsResultSetConcurrency (int type, int concurrency)
Determines whether there is support for a given concurrency style for the given ResultSet .
abstract boolean supportsResultSetHoldability (int holdability)
Determines whether the supplied ResultSet holdability mode is supported.
abstract boolean supportsResultSetType (int type)
Determines whether the supplied ResultSet type is supported.
abstract boolean supportsSavepoints ()
Determines whether savepoints for transactions are supported.
abstract boolean supportsSchemasInDataManipulation ()
Determines whether a schema name may be used in a data manipulation statement.
abstract boolean supportsSchemasInIndexDefinitions ()
Determines whether a schema name may be used in an index definition statement.
abstract boolean supportsSchemasInPrivilegeDefinitions ()
Determines whether a database schema name can be used in a privilege definition statement.
abstract boolean supportsSchemasInProcedureCalls ()
Determines whether a procedure call statement may be contain in a schema name.
abstract boolean supportsSchemasInTableDefinitions ()
Determines whether a schema name can be used in a table definition statement.
abstract boolean supportsSelectForUpdate ()
Determines whether the SELECT FOR UPDATE statement is supported.
abstract boolean supportsStatementPooling ()
Determines whether statement pooling is supported.
abstract boolean supportsStoredFunctionsUsingCallSyntax ()
Determine if this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.
abstract boolean supportsStoredProcedures ()
Determines whether stored procedure calls using the stored procedure escape syntax is supported.
abstract boolean supportsSubqueriesInComparisons ()
Determines whether subqueries in comparison expressions are supported.
abstract boolean supportsSubqueriesInExists ()
Determines whether subqueries in EXISTS expressions are supported.
abstract boolean supportsSubqueriesInIns ()
Determines whether subqueries in IN statements are supported.
abstract boolean supportsSubqueriesInQuantifieds ()
Determines whether subqueries in quantified expressions are supported.
abstract boolean supportsTableCorrelationNames ()
Determines whether the database has table correlation names support.
abstract boolean supportsTransactionIsolationLevel (int level)
Determines whether a specified transaction isolation level is supported.
abstract boolean supportsTransactions ()
Determines whether transactions are supported.
abstract boolean supportsUnion ()
Determines whether the SQL UNION operation is supported.
abstract boolean supportsUnionAll ()
Determines whether the SQL UNION ALL operation is supported.
abstract boolean updatesAreDetected (int type)
Determines whether the method ResultSet.rowUpdated can detect a visible row update for the specified ResultSet type.
abstract boolean usesLocalFilePerTable ()
Determines whether this database uses a file for each table.
abstract boolean usesLocalFiles ()
Determines whether this database uses a local file to store tables.
[Expand]
Inherited Methods
From interface java.sql.Wrapper

Constants

public static final short attributeNoNulls

Added in API level 1

States that it may not be permitted to store NULL values.

Constant Value: 0 (0x00000000)

public static final short attributeNullable

Added in API level 1

States that NULL values are definitely permitted.

Constant Value: 1 (0x00000001)

public static final short attributeNullableUnknown

Added in API level 1

States that whether NULL values are permitted is unknown.

Constant Value: 2 (0x00000002)

public static final int bestRowNotPseudo

Added in API level 1

States the best row identifier is NOT a pseudo column.

Constant Value: 1 (0x00000001)

public static final int bestRowPseudo

Added in API level 1

States that the best row identifier is a pseudo column.

Constant Value: 2 (0x00000002)

public static final int bestRowSession

Added in API level 1

States that the remainder of the current session is used as the scope for the best row identifier.

Constant Value: 2 (0x00000002)

public static final int bestRowTemporary

Added in API level 1

States that best row identifier scope lasts only while the row is being used.

Constant Value: 0 (0x00000000)

public static final int bestRowTransaction

Added in API level 1

States that the remainder of the current transaction is used as the scope for the best row identifier.

Constant Value: 1 (0x00000001)

public static final int bestRowUnknown

Added in API level 1

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

Constant Value: 0 (0x00000000)

public static final int columnNoNulls

Added in API level 1

States that the column must not allow NULL values.

Constant Value: 0 (0x00000000)

public static final int columnNullable

Added in API level 1

States that the column definitely allows NULL values.

Constant Value: 1 (0x00000001)

public static final int columnNullableUnknown

Added in API level 1

States that it is unknown whether the columns may be nulled.

Constant Value: 2 (0x00000002)

public static final int functionColumnIn

Added in API level 9

States that the parameter or column is an IN parameter

Constant Value: 1 (0x00000001)

public static final int functionColumnInOut

Added in API level 9

States that the parameter or column is an INOUT parameter

Constant Value: 2 (0x00000002)

public static final int functionColumnOut

Added in API level 9

States that the parameter or column is an OUT parameter

Constant Value: 3 (0x00000003)

public static final int functionColumnResult

Added in API level 9

States that the parameter or column is a column in a result set

Constant Value: 5 (0x00000005)

public static final int functionColumnUnknown

Added in API level 9

States that the parameter of function is unknown

Constant Value: 0 (0x00000000)

public static final int functionNoNulls

Added in API level 9

States that NULL values are not allowed

Constant Value: 0 (0x00000000)

public static final int functionNoTable

Added in API level 9

States that the function does not return a table

Constant Value: 1 (0x00000001)

public static final int functionNullable

Added in API level 9

States that NULL values are allowed

Constant Value: 1 (0x00000001)

public static final int functionNullableUnknown

Added in API level 9

States that whether NULL values are allowed is unknown

Constant Value: 2 (0x00000002)

public static final int functionResultUnknown

Added in API level 9

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

Constant Value: 0 (0x00000000)

public static final int functionReturn

Added in API level 9

States that the parameter or column is a return value

Constant Value: 4 (0x00000004)

public static final int functionReturnsTable

Added in API level 9

States that the function returns a table.

Constant Value: 2 (0x00000002)

public static final int importedKeyCascade

Added in API level 1

For the column UPDATE_RULE , states that when the primary key is updated, the foreign key (imported key) is changed accordingly.

Constant Value: 0 (0x00000000)

public static final int importedKeyInitiallyDeferred

Added in API level 1

States that the evaluation of foreign key constraints is deferred (delayed until commit).

Constant Value: 5 (0x00000005)

public static final int importedKeyInitiallyImmediate

Added in API level 1

States that the evaluation of foreign key constraint is IMMEDIATE .

Constant Value: 6 (0x00000006)

public static final int importedKeyNoAction

Added in API level 1

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

Constant Value: 3 (0x00000003)

public static final int importedKeyNotDeferrable

Added in API level 1

States that the evaluation of foreign key constraint must not be DEFERRED .

Constant Value: 7 (0x00000007)

public static final int importedKeyRestrict

Added in API level 1

States that a primary key must not be updated when imported as a foreign key by some other table. Used for the column UPDATE_RULE .

Constant Value: 1 (0x00000001)

public static final int importedKeySetDefault

Added in API level 1

States that when the primary key is modified (updated or deleted) the foreign (imported) key is changed to its default value. Applies to the UPDATE_RULE and DELETE_RULE columns.

Constant Value: 4 (0x00000004)

public static final int importedKeySetNull

Added in API level 1

States that when the primary key is modified (updated or deleted) the foreign (imported) key is changed to NULL . Applies to the UPDATE_RULE and DELETE_RULE columns.

Constant Value: 2 (0x00000002)

public static final int procedureColumnIn

Added in API level 1

States that the column stores IN type parameters.

Constant Value: 1 (0x00000001)

public static final int procedureColumnInOut

Added in API level 1

States that this column stores INOUT type parameters.

Constant Value: 2 (0x00000002)

public static final int procedureColumnOut

Added in API level 1

States that this column stores OUT type parameters.

Constant Value: 4 (0x00000004)

public static final int procedureColumnResult

Added in API level 1

States that the column stores results.

Constant Value: 3 (0x00000003)

public static final int procedureColumnReturn

Added in API level 1

States that the column stores return values.

Constant Value: 5 (0x00000005)

public static final int procedureColumnUnknown

Added in API level 1

States that type of the column is unknown.

Constant Value: 0 (0x00000000)

public static final int procedureNoNulls

Added in API level 1

States that NULL values are not permitted.

Constant Value: 0 (0x00000000)

public static final int procedureNoResult

Added in API level 1

States that the procedure does not return a result.

Constant Value: 1 (0x00000001)

public static final int procedureNullable

Added in API level 1

States that NULL values are permitted.

Constant Value: 1 (0x00000001)

public static final int procedureNullableUnknown

Added in API level 1

States that it is unknown whether NULL values are permitted.

Constant Value: 2 (0x00000002)

public static final int procedureResultUnknown

Added in API level 1

States that it is unknown whether or not the procedure returns a result.

Constant Value: 0 (0x00000000)

public static final int procedureReturnsResult

Added in API level 1

States that the procedure returns a result.

Constant Value: 2 (0x00000002)

public static final int sqlStateSQL

Added in API level 9

States that the method DatabaseMetaData.getSQLStateType may returns an SQLSTATE value or not.

Constant Value: 2 (0x00000002)

public static final int sqlStateSQL99

Added in API level 1

States that the value is an SQL99 SQLSTATE value.

Constant Value: 2 (0x00000002)

public static final int sqlStateXOpen

Added in API level 1

States that the value is an SQL CLI SQLSTATE value as defined by the X/Open standard.

Constant Value: 1 (0x00000001)

public static final short tableIndexClustered

Added in API level 1

States that this table index is a clustered index.

Constant Value: 1 (0x00000001)

public static final short tableIndexHashed

Added in API level 1

States that this table index is a hashed index.

Constant Value: 2 (0x00000002)

public static final short tableIndexOther

Added in API level 1

States this table's index is neither a clustered index, not a hashed index, and not a table statistics index; i.e. it is something else.

Constant Value: 3 (0x00000003)

public static final short tableIndexStatistic

Added in API level 1

States this column has the table's statistics, and that it is returned in conjunction with the table's index description.

Constant Value: 0 (0x00000000)

public static final int typeNoNulls

Added in API level 1

States that a NULL value is NOT permitted for this data type.

Constant Value: 0 (0x00000000)

public static final int typeNullable

Added in API level 1

States that a NULL value is permitted for this data type.

Constant Value: 1 (0x00000001)

public static final int typeNullableUnknown

Added in API level 1

States that it is unknown if a NULL value is permitted for this data type.

Constant Value: 2 (0x00000002)

public static final int typePredBasic

Added in API level 1

States that this column shall not be used for WHERE statements with a LIKE clause.

Constant Value: 2 (0x00000002)

public static final int typePredChar

Added in API level 1

States that this column can only be used in a WHERE...LIKE statement.

Constant Value: 1 (0x00000001)

public static final int typePredNone

Added in API level 1

States that this column does not support searches.

Constant Value: 0 (0x00000000)

public static final int typeSearchable

Added in API level 1

States that the column is searchable.

Constant Value: 3 (0x00000003)

public static final int versionColumnNotPseudo

Added in API level 1

States that the version column is known to be not a pseudo column.

Constant Value: 1 (0x00000001)

public static final int versionColumnPseudo

Added in API level 1

States that this version column is known to be a pseudo column.

Constant Value: 2 (0x00000002)

public static final int versionColumnUnknown

Added in API level 1

States that the version column may be a pseudo column or not.

Constant Value: 0 (0x00000000)

Public Methods

public abstract boolean allProceduresAreCallable ()

Added in API level 1

Returns whether all procedures returned by getProcedures(String, String, String) can be called by the current user.

Returns
  • true if all procedures can be called by the current user, false otherwise.
Throws
SQLException if there is a database error.

public abstract boolean allTablesAreSelectable ()

Added in API level 1

Returns whether all the tables returned by getTables can be used by the current user in a SELECT statement.

Returns
  • true if all the tables can be used, false otherwise.
Throws
SQLException if there is a database error.

public abstract boolean autoCommitFailureClosesAllResultSets ()

Added in API level 9

Determine if a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable

Returns
  • true if all open ResultSets are closed
Throws
SQLException if any error occurs

public abstract boolean dataDefinitionCausesTransactionCommit ()

Added in API level 1

Returns whether a data definition statement in a transaction forces a commit of the transaction.

Returns
  • true if the statement forces a commit, false otherwise.
Throws
SQLException if there is a database error.

public abstract boolean dataDefinitionIgnoredInTransactions ()

Added in API level 1

Returns whether the database ignores data definition statements within a transaction.

Returns
  • true if the database ignores a data definition statement, false otherwise.
Throws
SQLException if there is a database error.

public abstract boolean deletesAreDetected (int type)

Added in API level 1

Returns whether a visible row delete can be detected by calling rowDeleted() .

Parameters
type the type of the ResultSet involved: ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if the visible row delete can be detected, false otherwise.
Throws
SQLException if there is a database error.

public abstract boolean doesMaxRowSizeIncludeBlobs ()

Added in API level 1

Returns whether the return value of getMaxRowSize includes the SQL data types LONGVARCHAR and LONGVARBINARY .

Returns
  • true if the return value includes LONGVARBINARY and LONGVARCHAR , otherwise false .
Throws
SQLException if there is a database error.

public abstract ResultSet getAttributes ( String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)

Added in API level 1

Returns a ResultSet describing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog. The subset is determined by restricting to those attributes whose name matches the attributeNamePattern and whose type name matches the typeNamePattern . Each row of the ResultSet describes one attribute, and the rows are ordered by the columns TYPE_SCHEM , TYPE_NAME and ORDINAL_POSITION . Inherited attributes are not included.

The columns of the returned ResultSet object have the following names and meanings:

  1. TYPE_CAT - String - the type catalog name (possibly null )
  2. TYPE_SCHEM - String - the type schema name (possibly null )
  3. TYPE_NAME - String - the type name
  4. ATTR_NAME - String - the attribute name
  5. DATA_TYPE - int - the attribute type as defined in java.sql.Types
  6. ATTR_TYPE_NAME - String - the attribute type name. This depends on the data source. For a UDT the name is fully qualified. For a REF it is both fully qualified and represents the target type of the reference.
  7. ATTR_SIZE - int - the column size. When referring to char and date types this value is the maximum number of characters. When referring to numeric types is is the precision.
  8. DECIMAL_DIGITS - int - how many fractional digits are supported
  9. NUM_PREC_RADIX - int - numeric values radix
  10. NULLABLE - int - whether NULL is permitted:
    • DatabaseMetaData.attributeNoNulls - NULL values not permitted
    • DatabaseMetaData.attributeNullable - NULL values definitely permitted
    • DatabaseMetaData.attributeNullableUnknown - unknown
  11. REMARKS - String - a comment describing the attribute (possibly null )
  12. ATTR_DEF - String - Default value for the attribute (possibly null )
  13. SQL_DATA_TYPE - int - not used
  14. SQL_DATETIME_SUB - int - not used
  15. CHAR_OCTET_LENGTH - int - for CHAR types, the max number of bytes in the column
  16. ORDINAL_POSITION - int - The index of the column in the table (where the count starts from 1, not 0)
  17. IS_NULLABLE - String - "NO" = the column does not allow NULL s, "YES" = the column allows NULL s, "" = status unknown
  18. SCOPE_CATALOG - String - if the DATA_TYPE is REF , this gives the catalog of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  19. SCOPE_SCHEMA - String - if the DATA_TYPE is REF , this gives the schema of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  20. SCOPE_TABLE - String - if the DATA_TYPE is REF , this gives the name of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  21. SOURCE_DATA_TYPE - String - The source type for a user generated REF type or for a Distinct type. ( NULL if DATA_TYPE is not DISTINCT or a user generated REF)

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by a schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
typeNamePattern a type name. This pattern must match the type name stored in the database.
attributeNamePattern an Attribute name. This pattern must match the attribute name as stored in the database.
Returns
  • a ResultSet , where each row is an attribute description.
Throws
SQLException if there is a database error.

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

Added in API level 1

Returns a list of a table's optimal set of columns that uniquely identify the rows. The results are ordered by SCOPE (see below).

The results are returned as a table, with one entry for each column, as follows:

  1. SCOPE - short - the SCOPE of the result, as follows:
    • DatabaseMetaData.bestRowTemporary - the result is very temporary, only valid while on the current row
    • DatabaseMetaData.bestRowTransaction - the result is good for remainder of current transaction
    • DatabaseMetaData.bestRowSession - the result is good for remainder of database session
  2. COLUMN_NAME - String - the column name
  3. DATA_TYPE - int - the Type of the data, as defined in java.sql.Types
  4. TYPE_NAME - String - the Name of the type - database dependent. For UDT types the name is fully qualified
  5. COLUMN_SIZE - int - the precision of the data in the column
  6. BUFFER_LENGTH - int - not used
  7. DECIMAL_DIGITS - short - number of fractional digits
  8. PSEUDO_COLUMN - short - whether this is a pseudo column (e.g. an Oracle ROWID ):
    • DatabaseMetaData.bestRowUnknown - it is not known whether this is a pseudo column
    • DatabaseMetaData.bestRowNotPseudo - the column is not pseudo
    • DatabaseMetaData.bestRowPseudo - the column is a pseudo column

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table the table name. This must match the name of the table as declared in the database.
scope the SCOPE of interest, values as defined above.
nullable true = include columns that are nullable, false = do not include nullable columns.
Returns
  • a ResultSet where each row is a description of a column and the complete set of rows is the optimal set for this table.
Throws
SQLException if there is a database error.

public abstract String getCatalogSeparator ()

Added in API level 1

Returns the separator that this database uses between a catalog name and table name.

Returns
  • a String containing the separator.
Throws
SQLException if there is a database error.

public abstract String getCatalogTerm ()

Added in API level 1

Returns the term that the database vendor prefers term for "catalog".

Returns
  • a String with the vendor's term for "catalog".
Throws
SQLException if there is a database error.

public abstract ResultSet getCatalogs ()

Added in API level 1

Returns the set of catalog names available in this database. The set is returned ordered by catalog name.

Returns
  • a ResultSet containing the catalog names, with each row containing one catalog name (as a String ) in the single column named TABLE_CAT .
Throws
SQLException if there is a database error.

public abstract ResultSet getClientInfoProperties ()

Added in API level 9

Returns a list of the client info properties of the driver.

Returns
  • a list of the client info
Throws
SQLException if any error occurs

public abstract ResultSet getColumnPrivileges ( String catalog, String schema, String table, String columnNamePattern)

Added in API level 1

Returns a description of access rights for a table's columns. Only access rights matching the criteria for the column name are returned.

The description is returned as a ResultSet with rows of data for each access right, with columns as follows:

  1. TABLE_CAT - String - the catalog name (possibly null )
  2. TABLE_SCHEM - String - the schema name (possibly null )
  3. TABLE_NAME - String - the table name
  4. COLUMN_NAME - String - the Column name
  5. GRANTOR - String - the grantor of access (possibly null )
  6. PRIVILEGE - String - Access right - one of SELECT, INSERT, UPDATE, REFERENCES,...
  7. IS_GRANTABLE - String - "YES" implies that the receiver can grant access to others, "NO" if the receiver cannot grant access to others, null if unknown.

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table the table name. This must match the name of the table as declared in the database.
columnNamePattern the column name. This must match the name of a column in the table in the database.
Returns
  • a ResultSet containing the access rights, one row for each privilege description.
Throws
SQLException if there is a database error.

public abstract ResultSet getColumns ( String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)

Added in API level 1

Returns a description of table columns available in a specified catalog. Only descriptions meeting the specified catalog, schema, table, and column names are returned.

The descriptions are returned as a ResultSet conforming to the following data layout, with one row per table column:

  1. TABLE_CAT - String - the catalog name (possibly null )
  2. TABLE_SCHEM - String - the schema name (possibly null )
  3. TABLE_NAME - String - the table name
  4. COLUMN_NAME - String - the column name
  5. DATA_TYPE - int - the SQL type as specified in java.sql.Types
  6. TYPE_NAME - String - the name of the data type, (database-dependent, UDT names are fully qualified)
  7. COLUMN_SIZE - int - the column size (the precision for numeric types, max characters for char and date types)
  8. BUFFER_LENGTH - int - Not used
  9. DECIMAL_DIGITS - int - maximum number of fractional digits
  10. NUM_PREC_RADIX - int - the radix for numerical types
  11. NULLABLE - int - whether the column allows null s:
    • DatabaseMetaData.columnNoNulls = may not allow NULL s
    • DatabaseMetaData.columnNullable = does allow NULL s
    • DatabaseMetaData.columnNullableUnknown = unknown NULL status
  12. REMARKS - String - A description of the column (possibly null )
  13. COLUMN_DEF - String - Default value for the column (possibly null )
  14. SQL_DATA_TYPE - int - not used
  15. SQL_DATETIME_SUB - int - not used
  16. CHAR_OCTET_LENGTH - int - maximum number of bytes in the char type columns
  17. ORDINAL_POSITION - int - the column index in the table (1 based)
  18. IS_NULLABLE - String - "NO" = column does not allow NULLs, "YES" = column allows NULLs, "" = NULL status unknown
  19. SCOPE_CATALOG - String - if the DATA_TYPE is REF , this gives the catalog of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  20. SCOPE_SCHEMA - String - if the DATA_TYPE is REF , this gives the schema of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  21. SCOPE_TABLE - String - if the DATA_TYPE is REF , this gives the name of the table corresponding to the attribute's scope. NULL if the DATA_TYPE is not REF.
  22. SOURCE_DATA_TYPE - String - The source type for a user generated REF type or for a Distinct type. ( NULL if DATA_TYPE is not DISTINCT or a user generated REF)

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
tableNamePattern the table name. This must match the name of the table as declared in the database.
columnNamePattern the column name. This must match the name of a column in the table in the database.
Returns
  • the descriptions as a ResultSet with rows in the form defined above.
Throws
SQLException if there is a database error.

public abstract Connection getConnection ()

Added in API level 1

Returns the database connection that created this metadata.

Returns
  • the connection to the database.
Throws
SQLException if there is a database error.

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

Added in API level 1

Returns a list of foreign key columns in a given foreign key table that reference the primary key columns of a supplied primary key table. This describes how one table imports the key of another table. It would be expected to return a single foreign key - primary key pair in most cases.

The descriptions are returned as a ResultSet with one row for each foreign key, with the following layout:

  1. PKTABLE_CAT - String - from the primary key table : Catalog (possibly null )
  2. PKTABLE_SCHEM - String - from the primary key table : Schema (possibly null )
  3. PKTABLE_NAME - String - from the primary key table : name
  4. PKCOLUMN_NAME - String - from the primary key column : name
  5. FKTABLE_CAT - String - from the foreign key table : the catalog name being exported (possibly null )
  6. FKTABLE_SCHEM - String - from the foreign key table : the schema name being exported (possibly null )
  7. FKTABLE_NAME - String - from the foreign key table : the name being exported
  8. FKCOLUMN_NAME - String - from the foreign key column : the name being exported
  9. KEY_SEQ - short - the sequence number (in the foreign key)
  10. UPDATE_RULE - short - a value giving the rule for how to treat the corresponding foreign key when a primary key is updated:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be updated if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - change the imported key to match the updated primary key
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  11. DELETE_RULE - short - a value giving the rule for how to treat the foreign key when the corresponding primary key is deleted:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be deleted if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - delete those rows that import a deleted key
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  12. FK_NAME - String - the foreign key name (possibly null )
  13. PK_NAME - String - the primary key name (possibly null )
  14. DEFERRABILITY - short - whether foreign key constraints can be deferred until commit (see the SQL92 specification for definitions):
    • DatabaseMetaData.importedKeyInitiallyDeferred
    • DatabaseMetaData.importedKeyInitiallyImmediate
    • DatabaseMetaData.importedKeyNotDeferrable

Parameters
primaryCatalog a catalog name for the primary key table. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
primarySchema a schema name for the primary key table. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
primaryTable the name of the table which exports the key. It must match the name of the table in the database.
foreignCatalog a catalog name for the foreign key table. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
foreignSchema a schema name for the foreign key table. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
foreignTable the name of the table importing the key. It must match the name of the table in the database.
Returns
  • a ResultSet containing rows with the descriptions of the foreign keys laid out according to the format defined above.
Throws
SQLException if there is a database error.

public abstract int getDatabaseMajorVersion ()

Added in API level 1

Returns the major version number of the database software.

Returns
  • the major version number of the database software.
Throws
SQLException a database error occurred.

public abstract int getDatabaseMinorVersion ()

Added in API level 1

Returns the minor version number of the database software.

Returns
  • the minor version number of the database software.
Throws
SQLException a database error occurred.

public abstract String getDatabaseProductName ()

Added in API level 1

Returns the name of the database software.

Returns
  • a String with the name of the database software.
Throws
SQLException a database error occurred.

public abstract String getDatabaseProductVersion ()

Added in API level 1

Returns the version number of this database software.

Returns
  • a String with the version number of the database software.
Throws
SQLException a database error occurred.

public abstract int getDefaultTransactionIsolation ()

Added in API level 1

Returns the default transaction isolation level for this database.

Returns
  • the default transaction isolation level. One of the following values:
    • TRANSACTION_NONE
    • TRANSACTION_READ_COMMITTED
    • TRANSACTION_READ_UNCOMMITTED
    • TRANSACTION_REPEATABLE_READ
    • TRANSACTION_SERIALIZABLE
Throws
SQLException a database error occurred.

public abstract int getDriverMajorVersion ()

Added in API level 1

Returns the JDBC driver's major version number.

Returns
  • the driver's major version number.

public abstract int getDriverMinorVersion ()

Added in API level 1

Returns the JDBC driver's minor version number.

Returns
  • the driver's minor version number.

public abstract String getDriverName ()

Added in API level 1

Returns the name of this JDBC driver.

Returns
  • a String containing the name of the JDBC driver
Throws
SQLException a database error occurred.

public abstract String getDriverVersion ()

Added in API level 1

Returns the version number of this JDBC driver.

Returns
  • a String containing the complete version number of the JDBC driver.
Throws
SQLException a database error occurred.

public abstract ResultSet getExportedKeys ( String catalog, String schema, String table)

Added in API level 1

Returns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).

The list is returned as a ResultSet with a row for each of the foreign key columns, ordered by FKTABLE_CAT , FKTABLE_SCHEM , FKTABLE_NAME , and KEY_SEQ , with the format for each row being:

  1. PKTABLE_CAT - String - from the primary key table : the catalog (possibly null )
  2. PKTABLE_SCHEM - String - from the primary key table : the schema (possibly null )
  3. PKTABLE_NAME - String - from the primary key table : the name
  4. PKCOLUMN_NAME - String - from the primary key column : the name
  5. FKTABLE_CAT - String - from the foreign key table : the catalog name being exported (possibly null )
  6. FKTABLE_SCHEM - String - from the foreign key table : the schema name being exported (possibly null )
  7. FKTABLE_NAME - String - from the foreign key table : the name being exported
  8. FKCOLUMN_NAME - String - from the foreign key column : the name being exported
  9. KEY_SEQ - short - the sequence number (in the foreign key)
  10. UPDATE_RULE - short - a value giving the rule for how to treat the foreign key when the corresponding primary key is updated:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be updated if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - change the imported key to match the primary key update
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  11. DELETE_RULE - short - how to treat the foreign key when the corresponding primary key is deleted:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be deleted if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - the deletion should also delete rows that import a deleted key
    • DatabaseMetaData.importedKeySetNull - the deletion sets the imported key to null
    • DatabaseMetaData.importedKeySetDefault - the deletion sets the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  12. FK_NAME - String - the foreign key name (possibly null )
  13. PK_NAME - String - the primary key name (possibly null )
  14. DEFERRABILITY - short - defines whether the foreign key constraints can be deferred until commit (see the SQL92 specification for definitions):
    • DatabaseMetaData.importedKeyInitiallyDeferred
    • DatabaseMetaData.importedKeyInitiallyImmediate
    • DatabaseMetaData.importedKeyNotDeferrable

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table a table name, which must match the name of a table in the database
Returns
  • a ResultSet containing a row for each of the foreign key columns, as defined above
Throws
SQLException a database error occurred

public abstract String getExtraNameCharacters ()

Added in API level 1

Returns a string of characters that may be used in unquoted identifier names. The characters a-z , A-Z , 0-9 and _ are always permitted.

Returns
  • a String containing all the additional permitted characters.
Throws
SQLException a database error occurred.

public abstract ResultSet getFunctionColumns ( String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)

Added in API level 9

Returns a description according to the given catalog's system or user function parameters and return type.

Parameters
catalog the given catalong
schemaPattern the schema pattern
functionNamePattern the function name pattern
columnNamePattern the column name pattern
Returns
  • a description of user functions
Throws
SQLException if any error occurs

public abstract ResultSet getFunctions ( String catalog, String schemaPattern, String functionNamePattern)

Added in API level 9

Returns a description of the system and user functions available according to the given catalog.

Parameters
catalog the given catalog
schemaPattern the schema pattern
functionNamePattern the function name pattern
Returns
  • user functions
Throws
SQLException if any error occurs

public abstract String getIdentifierQuoteString ()

Added in API level 1

Returns the string used to quote SQL identifiers. Returns " " (space) if identifier quoting not supported.

Returns
  • the String used to quote SQL identifiers.
Throws
SQLException a database error occurred.

public abstract ResultSet getImportedKeys ( String catalog, String schema, String table)

Added in API level 1

Returns a list columns in a table that are both primary keys and referenced by the table's foreign key columns (that is, the primary keys imported by a table).

The list returned is a ResultSet with a row entry for each primary key column, ordered by PKTABLE_CAT , PKTABLE_SCHEM , PKTABLE_NAME , and KEY_SEQ , with the following format:

  1. PKTABLE_CAT - String - primary key catalog name being imported (possibly null )
  2. PKTABLE_SCHEM - String - primary key schema name being imported (possibly null )
  3. PKTABLE_NAME - String - primary key table name being imported
  4. PKCOLUMN_NAME - String - primary key column name being imported
  5. FKTABLE_CAT - String - foreign key table catalog name (possibly null )
  6. FKTABLE_SCHEM - String - foreign key table schema name (possibly null )
  7. FKTABLE_NAME - String - foreign key table name
  8. FKCOLUMN_NAME - String - foreign key column name
  9. KEY_SEQ - short - sequence number (in the foreign key)
  10. UPDATE_RULE - short - how to treat the foreign key when the corresponding primary key is updated:
    • DatabaseMetaData.importedKeyNoAction - don't allow any update of the primary key if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - change imported key to match the primary key update
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  11. DELETE_RULE - short - how to treat the foreign key when the corresponding primary key is deleted:
    • DatabaseMetaData.importedKeyNoAction - don't allow the primary key to be deleted if it is imported as a foreign key
    • DatabaseMetaData.importedKeyCascade - delete those rows that import a deleted key
    • DatabaseMetaData.importedKeySetNull - set the imported key to null
    • DatabaseMetaData.importedKeySetDefault - set the imported key to its default value
    • DatabaseMetaData.importedKeyRestrict - same as importedKeyNoAction
  12. FK_NAME - String - foreign key name (possibly null )
  13. PK_NAME - String - primary key name (possibly null )
  14. DEFERRABILITY - short - defines whether foreign key constraints can be deferred until commit (see SQL92 specification for definitions):
    • DatabaseMetaData.importedKeyInitiallyDeferred
    • DatabaseMetaData.importedKeyInitiallyImmediate
    • DatabaseMetaData.importedKeyNotDeferrable

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table a table name, which must match the name of a table in the database.
Returns
  • a ResultSet containing the list of primary key columns as rows in the format defined above.
Throws
SQLException a database error occurred.

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

Added in API level 1

Returns a list of indices and statistics for a specified table.

The list is returned as a ResultSet , with one row for each index or statistic. The list is ordered by NON_UNIQUE , TYPE , INDEX_NAME , and ORDINAL_POSITION . Each row has the following format:

  1. TABLE_CAT - String - table catalog name (possibly null )
  2. TABLE_SCHEM - String - table schema name (possibly null )
  3. TABLE_NAME - String - The table name
  4. NON_UNIQUE - boolean - true when index values can be non-unique. Must be false when the TYPE is tableIndexStatistic
  5. INDEX_QUALIFIER - String : index catalog name. null when the TYPE is 'tableIndexStatistic'
  6. INDEX_NAME - String : index name. null when TYPE is 'tableIndexStatistic'
  7. TYPE - short - the index type. One of:
    • DatabaseMetaData.tableIndexStatistic - table statistics returned with Index descriptions
    • DatabaseMetaData.tableIndexClustered - a clustered Index
    • DatabaseMetaData.tableIndexHashed - a hashed Index
    • DatabaseMetaData.tableIndexOther - other style of Index
  8. ORDINAL_POSITION - short - column sequence within Index. 0 when TYPE is tableIndexStatistic
  9. COLUMN_NAME - String - the column name. null when TYPE is tableIndexStatistic
  10. ASC_OR_DESC - String - column sort sequence. null if sequencing not supported or TYPE is tableIndexStatistic; otherwise "A" means sort ascending and "D" means sort descending.
  11. CARDINALITY - int - Number of unique values in the Index. If TYPE is tableIndexStatistic, this is number of rows in the table.
  12. PAGES - int - Number of pages for current Index. If TYPE is tableIndexStatistic, this is number of pages used for the table.
  13. FILTER_CONDITION - String - Filter condition. (possibly null)

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table a table name, which must match the name of a table in the database.
unique true means only return indices for unique values, false implies that they can be returned even if not unique.
approximate true implies that the list can contain approximate or "out of data" values, false implies that all values must be precisely accurate
Returns
  • a ResultSet containing the list of indices and statistics for the table, in the format defined above.
Throws
SQLException a database error occurred.

public abstract int getJDBCMajorVersion ()

Added in API level 1

Returns this driver's major JDBC version number.

Returns
  • the major JDBC version number.
Throws
SQLException a database error occurred.

public abstract int getJDBCMinorVersion ()

Added in API level 1

Returns the minor JDBC version number for this driver.

Returns
  • the Minor JDBC Version Number.
Throws
SQLException a database error occurred.

public abstract int getMaxBinaryLiteralLength ()

Added in API level 1

Get the maximum number of hex characters in an in-line binary literal for this database.

Returns
  • the maximum number of hex characters in an in-line binary literal. If the number is unlimited then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxCatalogNameLength ()

Added in API level 1

Returns the maximum size of a catalog name in this database.

Returns
  • the maximum size in characters for a catalog name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxCharLiteralLength ()

Added in API level 1

Returns the maximum size for a character literal in this database.

Returns
  • the maximum size in characters for a character literal. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnNameLength ()

Added in API level 1

Returns the maximum size for a Column name for this database.

Returns
  • the maximum number of characters for a Column name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnsInGroupBy ()

Added in API level 1

Get the maximum number of columns in a GROUP BY clause for this database.

Returns
  • the maximum number of columns in a GROUP BY clause. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnsInIndex ()

Added in API level 1

Returns the maximum number of columns in an Index for this database.

Returns
  • the maximum number of columns in an Index. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnsInOrderBy ()

Added in API level 1

Returns the maximum number of columns in an ORDER BY clause for this database.

Returns
  • the maximum number of columns in an ORDER BY clause. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnsInSelect ()

Added in API level 1

Returns the maximum number of columns in a SELECT list for this database.

Returns
  • the maximum number of columns in a SELECT list. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxColumnsInTable ()

Added in API level 1

Returns the maximum number of columns in a table for this database.

Returns
  • the maximum number of columns in a table. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxConnections ()

Added in API level 1

Returns the database's maximum number of concurrent connections.

Returns
  • the maximum number of connections. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxCursorNameLength ()

Added in API level 1

Returns the maximum length of a cursor name for this database.

Returns
  • the maximum number of characters in a cursor name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxIndexLength ()

Added in API level 1

Returns the maximum length in bytes for an Index for this database. This covers all the parts of a composite index.

Returns
  • the maximum length in bytes for an Index. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxProcedureNameLength ()

Added in API level 1

Returns the maximum number of characters for a procedure name in this database.

Returns
  • the maximum number of character for a procedure name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxRowSize ()

Added in API level 1

Returns the maximum number of bytes within a single row for this database.

Returns
  • the maximum number of bytes for a single row. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxSchemaNameLength ()

Added in API level 1

Returns the maximum number of characters in a schema name for this database.

Returns
  • the maximum number of characters in a schema name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxStatementLength ()

Added in API level 1

Returns the maximum number of characters in an SQL statement for this database.

Returns
  • the maximum number of characters in an SQL statement. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxStatements ()

Added in API level 1

Get the maximum number of simultaneously open active statements for this database.

Returns
  • the maximum number of open active statements. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxTableNameLength ()

Added in API level 1

Returns the maximum size for a table name in the database.

Returns
  • the maximum size in characters for a table name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxTablesInSelect ()

Added in API level 1

Returns the maximum number of tables permitted in a SELECT statement for the database.

Returns
  • the maximum number of tables permitted in a SELECT statement. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract int getMaxUserNameLength ()

Added in API level 1

Returns the maximum number of characters in a user name for the database.

Returns
  • the maximum number of characters in a user name. If the limit is unknown, or the value is unlimited, then the result is zero.
Throws
SQLException a database error occurred.

public abstract String getNumericFunctions ()

Added in API level 1

Returns a list of the math functions available with this database. These are used in the JDBC function escape clause and are the Open Group CLI math function names.

Returns
  • a String which contains the list of math functions as a comma separated list.
Throws
SQLException a database error occurred.

public abstract ResultSet getPrimaryKeys ( String catalog, String schema, String table)

Added in API level 1

Returns a list of the primary key columns of a specified table.

The list is returned as a ResultSet with one row for each primary key column, ordered by COLUMN_NAME , with each row having the structure as follows:

  1. TABLE_CAT - String - table catalog name (possibly null)
  2. TABLE_SCHEM - String - table schema name (possibly null)
  3. TABLE_NAME - String - The table name
  4. COLUMN_NAME - String - The column name
  5. KEY_SEQ - short - the sequence number for this column in the primary key
  6. PK_NAME - String - the primary key name (possibly null)

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with the empty string used to retrieve those without a catalog name.
schema a schema name. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with the empty string used to retrieve those without a schema name.
table the name of a table, which must match the name of a table in the database.
Returns
  • a ResultSet containing the list of keys in the format defined above.
Throws
SQLException a database error occurred.

public abstract ResultSet getProcedureColumns ( String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)

Added in API level 1

Returns a list of parameter and result columns for the stored procedures belonging to a specified catalog.

The list is returned as a ResultSet with one row for each parameter or result column. The data is ordered by PROCEDURE_SCHEM and PROCEDURE_NAME , while for each procedure, the return value (if any) is first, followed by the parameters in the order they appear in the stored procedure call, followed by ResultSet columns in column number order. Each row has the following structure:

  1. PROCEDURE_CAT - String - the procedure catalog name
  2. PROCEDURE_SCHEM - String - the procedure schema name (possibly null)
  3. PROCEDURE_NAME - String - the procedure name
  4. COLUMN_NAME - String - the name of the column
  5. COLUMN_TYPE - short - the kind of column or parameter, as follows:
    • DatabaseMetaData.procedureColumnUnknown - type unknown
    • DatabaseMetaData.procedureColumnIn - an IN parameter
    • DatabaseMetaData.procedureColumnInOut - an INOUT parameter
    • DatabaseMetaData.procedureColumnOut - an OUT parameter
    • DatabaseMetaData.procedureColumnReturn - a return value
    • DatabaseMetaData.procedureReturnsResult - a result column in a result set
  6. DATA_TYPE - int - the SQL type of the data, as in java.sql.Types
  7. TYPE_NAME - String - the SQL type name, for a UDT it is fully qualified
  8. PRECISION - int - the precision
  9. LENGTH - int - the length of the data in bytes
  10. SCALE - short - the scale for numeric types
  11. RADIX - short - the Radix for numeric data (typically 2 or 10)
  12. NULLABLE - short - can the data contain null :
    • DatabaseMetaData.procedureNoNulls - NULL s not permitted
    • DatabaseMetaData.procedureNullable - NULL s are permitted
    • DatabaseMetaData.procedureNullableUnknown - NULL status unknown
  13. REMARKS - String - an explanatory comment about the data item

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
procedureNamePattern a pattern that must match the name of the procedure stored in the database.
columnNamePattern a column name pattern. The name must match the column name stored in the database.
Returns
  • a ResultSet with the list of parameter and result columns in the format defined above.
Throws
SQLException a database error occurred.

public abstract String getProcedureTerm ()

Added in API level 1

Returns the database vendor's preferred name for "procedure".

Returns
  • a String with the vendor's preferred name for "procedure".
Throws
SQLException a database error occurred.

public abstract ResultSet getProcedures ( String catalog, String schemaPattern, String procedureNamePattern)

Added in API level 1

Returns a list of the stored procedures available in a specified catalog.

The list is returned as a ResultSet with one row for each stored procedure, ordered by PROCEDURE_SCHEM and PROCEDURE_NAME, with the data in each row as follows:

  1. PROCEDURE_CAT - String : the procedure catalog name
  2. PROCEDURE_SCHEM - String : the procedure schema name (possibly null )
  3. PROCEDURE_NAME - String : the procedure name
  4. Reserved
  5. Reserved
  6. Reserved
  7. REMARKS - String - information about the procedure
  8. PROCEDURE_TYPE - short : one of:
    • DatabaseMetaData.procedureResultUnknown - procedure may return a result
    • DatabaseMetaData.procedureNoResult - procedure does not return a result
    • DatabaseMetaData.procedureReturnsResult - procedure definitely returns a result

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
procedureNamePattern a procedure name pattern, which must match the procedure name stored in the database.
Returns
  • a ResultSet where each row is a description of a stored procedure in the format defined above.
Throws
SQLException a database error occurred.

public abstract int getResultSetHoldability ()

Added in API level 1

Returns the result set's default holdability.

Returns
  • one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT .
Throws
SQLException a database error occurred.

public abstract RowIdLifetime getRowIdLifetime ()

Added in API level 9

Returns the lifetime for which a RowId object remains valid if this data source supports the SQL ROWID type

Returns
  • the time of a RowId object that remains valid.
Throws
SQLException if any error occurs

public abstract String getSQLKeywords ()

Added in API level 1

Returns a list of all the SQL keywords that are NOT also SQL92 keywords for the database.

Returns
  • a String containing the list of SQL keywords in a comma separated format.
Throws
SQLException a database error occurred.

public abstract int getSQLStateType ()

Added in API level 1

States the type of SQLState value returned by SQLException.getSQLState . This can either be the X/Open (now known as Open Group) SQL CLI form or the SQL99 form.

Returns
  • an integer, which is either DatabaseMetaData.sqlStateSQL99 or DatabaseMetaData.sqlStateXOpen .
Throws
SQLException a database error occurred.

public abstract String getSchemaTerm ()

Added in API level 1

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

Returns
  • a String which is the vendor's preferred term for schema.
Throws
SQLException a database error occurred.

public abstract ResultSet getSchemas ( String catalog, String schemaPattern)

Added in API level 9

Returns the schema names ordered by TABLE_CATALOG and TABLE_SCHEMA.

Parameters
catalog the catalog
schemaPattern the schema pattern
Returns
  • the schema names
Throws
SQLException if any error occurs

public abstract ResultSet getSchemas ()

Added in API level 1

Returns a list of the schema names in the database. The list is returned as a ResultSet , ordered by the schema name, with one row per schema in the following format:

  1. TABLE_SCHEM - String - the schema name
  2. TABLE_CATALOG - String - the catalog name (possibly null )

Returns
  • a ResultSet with one row for each schema in the format defined above.
Throws
SQLException a database error occurred.

public abstract String getSearchStringEscape ()

Added in API level 1

Returns the string that is used to escape wildcard characters. This string is used to escape the '_' and '%' wildcard characters in catalog search pattern strings. '_' is used to represent any single character while '%' is used for a sequence of zero or more characters.

Returns
  • a String used to escape the wildcard characters.
Throws
SQLException a database error occurred.

public abstract String getStringFunctions ()

Added in API level 1

Returns a list of string functions available with the database. These functions are used in JDBC function escape clause and follow the Open Group CLI string function names definition.

Returns
  • a String containing the list of string functions in comma separated format.
Throws
SQLException a database error occurred.

public abstract ResultSet getSuperTables ( String catalog, String schemaPattern, String tableNamePattern)

Added in API level 1

Returns a listing of the hierarchies of tables in a specified schema in the database.

The listing only contains entries for tables that have a super table. Super tables and corresponding subtables must be defined in the same catalog and schema. The list is returned as a ResultSet , with one row for each table that has a super table, in the following format:

  1. TABLE_CAT - String - table catalog name (possibly null )
  2. TABLE_SCHEM - String - Table schema name (possibly null )
  3. TABLE_NAME - String - The table name
  4. SUPER TABLE_NAME - String - The super table name

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
tableNamePattern a table name, which should match the table name as stored in the database. it may be a fully qualified name. If it is fully qualified the catalog name and schema name parameters are ignored.
Returns
  • a ResultSet with one row for each table which has a super table, in the format defined above. An empty ResultSet is returned if the database does not support table hierarchies.
Throws
SQLException a database error occurred.

public abstract ResultSet getSuperTypes ( String catalog, String schemaPattern, String typeNamePattern)

Added in API level 1

Returns the User Defined Type (UDT) hierarchies for a given schema. Only the immediate parent/child relationship is described. If a UDT does not have a direct supertype, it is not listed.

The listing is returned as a ResultSet where there is one row for a specific UDT which describes its supertype, with the data organized in columns as follows:

  1. TYPE_CAT - String - the UDT catalog name (possibly null )
  2. TYPE_SCHEM - String - the UDT schema name (possibly null )
  3. TYPE_NAME - String - the UDT type name
  4. SUPER TYPE_CAT - String - direct supertype's catalog name (possibly null )
  5. SUPER TYPE_SCHEM - String - direct supertype's schema name (possibly null )
  6. SUPER TYPE_NAME - String - direct supertype's name

Parameters
catalog the catalog name. "" means get the UDTs without a catalog. null means don't use the catalog name to restrict the search.
schemaPattern the Schema pattern name. "" means get the UDT's without a schema.
typeNamePattern the UDT name pattern. This may be a fully qualified name. When a fully qualified name is specified, the catalog name and schema name parameters are ignored.
Returns
  • a ResultSet in which each row gives information about a particular UDT in the format defined above. An empty ResultSet is returned for a database that does not support type hierarchies.
Throws
SQLException a database error occurred.

public abstract String getSystemFunctions ()

Added in API level 1

Returns a list of system functions available with the database. These are names used in the JDBC function escape clause and are Open Group CLI function names.

Returns
  • a String containing the list of system functions in a comma separated format.
Throws
SQLException a database error occurred.

public abstract ResultSet getTablePrivileges ( String catalog, String schemaPattern, String tableNamePattern)

Added in API level 1

Returns a description of access rights for each table present in a catalog. Table privileges can apply to one or more columns in the table - but are not guaranteed to apply to all columns.

The privileges are returned as a ResultSet , with one row for each privilege, ordered by TABLE_SCHEM , TABLE_NAME , PRIVILEGE , and each row has data as defined in the following column definitions:

  1. TABLE_CAT - String - table catalog name (possibly null )
  2. TABLE_SCHEM - String - Table schema name (possibly null )
  3. TABLE_NAME - String - The table name
  4. GRANTOR - String - who granted the access
  5. GRANTEE - String - who received the access grant
  6. PRIVILEGE - String - the type of access granted - one of SELECT, INSERT, UPDATE, REFERENCES,...
  7. IS_GRANTABLE - String - "YES" implies the grantee can grant access to others, "NO" implies guarantee cannot grant access to others, null means this status is unknown

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
tableNamePattern a Table Name, which should match the table name as stored in the database.
Returns
  • a ResultSet containing a list with one row for each table in the format defined above.
Throws
SQLException a database error occurred.

public abstract ResultSet getTableTypes ()

Added in API level 1

Returns a list of table types supported by the database.

The list is returned as a ResultSet with one row per table type, ordered by the table type. The information in the ResultSet is structured into a single column per row, as follows:

  1. TABLE_TYPE - String - the table type. Typical names include "TABLE" , "VIEW" , " SYSTEM TABLE" , "ALIAS" , "SYNONYM" , "GLOBAL TEMPORARY"

Returns
  • a ResultSet with one row per table type in the format defined above.
Throws
SQLException a database error occurred.

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

Added in API level 1

Returns a description of the tables in a specified catalog.

The descriptions are returned as rows in a ResultSet , one row for each Table. The ResultSet is ordered by TABLE_TYPE , TABLE_SCHEM and TABLE_NAME . Each row in the ResultSet consists of a series of columns as follows:

  1. TABLE_CAT - String - table catalog name (possibly null )
  2. TABLE_SCHEM - String - Table schema name (possibly null )
  3. TABLE_NAME - String - The table name
  4. TABLE_TYPE - String - Typical names include "TABLE", "VIEW", "SYSTEM TABLE", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY"
  5. REMARKS - String - A comment describing the table
  6. TYPE_CAT - String - the 'Types' catalog(possibly null )
  7. TYPE_SCHEM - String - the 'Types' schema(possibly null )
  8. TYPE_NAME - String - the 'Types' name (possibly null )
  9. SELF_REFERENCING_COL_NAME - String - the name of a designated identifier column in a typed table (possibly null )
  10. REF_GENERATION - String - one of the following values : "SYSTEM" | "USER" | "DERIVED" - specifies how values in the SELF_REFERENCING_COL_NAME are created (possibly null )

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
tableNamePattern a table name, which should match the table name as stored in the database.
types a list of table types to include in the list. null implies list all types.
Returns
  • a ResultSet with one row per table in the format defined above.
Throws
SQLException a database error occurred.

public abstract String getTimeDateFunctions ()

Added in API level 1

Returns a list of time and date functions available for the database.

Returns
  • a string containing a comma separated list of the time and date functions.
Throws
SQLException a database error occurred.

public abstract ResultSet getTypeInfo ()

Added in API level 1

Get a list of the standard SQL types supported by this database. The list is returned as a ResultSet , with one row for each type, ordered by the DATA_TYPE value, where the data in each row is structured into the following columns:

  1. TYPE_NAME - String : the type name
  2. DATA_TYPE - int : the SQL data type value as defined in java.sql.Types
  3. PRECISION - int - the maximum precision of the type
  4. LITERAL_PREFIX - String : the prefix to be used when quoting a literal value (possibly null )
  5. LITERAL_SUFFIX - String : the suffix to be used when quoting a literal value (possibly null )
  6. CREATE_PARAMS - String : params used when creating the type (possibly null )
  7. NULLABLE - short : shows if the value is nullable:
    • DatabaseMetaData.typeNoNulls : NULL s not permitted
    • DatabaseMetaData.typeNullable : NULL s are permitted
    • DatabaseMetaData.typeNullableUnknown : NULL status unknown
  8. CASE_SENSITIVE - boolean : true if the type is case sensitive
  9. SEARCHABLE - short : how this type can be used with WHERE clauses:
    • DatabaseMetaData.typePredNone - WHERE clauses cannot be used
    • DatabaseMetaData.typePredChar - support for WHERE...LIKE only
    • DatabaseMetaData.typePredBasic - support except for WHERE...LIKE
    • DatabaseMetaData.typeSearchable - support for all WHERE clauses
  10. UNSIGNED_ATTRIBUTE - boolean - the type is unsigned or not
  11. FIXED_PREC_SCALE - boolean - fixed precision = it can be used as a money value
  12. AUTO_INCREMENT - boolean - can be used as an auto-increment value
  13. LOCAL_TYPE_NAME - String - a localized version of the type name (possibly null )
  14. MINIMUM_SCALE - short - the minimum scale supported
  15. MAXIMUM_SCALE - short - the maximum scale supported
  16. SQL_DATA_TYPE - int - not used
  17. SQL_DATETIME_SUB - int - not used
  18. NUM_PREC_RADIX - int - number radix (typically 2 or 10)

Returns
  • a ResultSet which is structured as described above.
Throws
SQLException a database error occurred.

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

Added in API level 1

Returns a description of the User Defined Types (UDTs) defined in a given schema, which includes the types DISTINCT , STRUCT and JAVA_OBJECT .

The types matching the supplied the specified catalog, schema, type name and type are returned as rows in a ResultSet with columns of information as follows:

  1. TABLE_CAT - String - catalog name (possibly null )
  2. TABLE_SCHEM - String - schema name (possibly null )
  3. TABLE_NAME - String - The table name
  4. CLASS_NAME - String - The Java class name
  5. DATA_TYPE - int - The SQL type as specified in java.sql.Types . One of DISTINCT, STRUCT, and JAVA_OBJECT
  6. REMARKS - String - A comment which describes the type
  7. BASE_TYPE - short - A type code. For a DISTINCT type, the source type. For a structured type this is the type that implements the user generated reference type of the SELF_REFERENCING_COLUMN . This is defined in java.sql.Types , and will be null if the DATA_TYPE does not match these criteria.

If the driver does not support UDTs, the ResultSet is empty.

Parameters
catalog a catalog name. null is used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schemaPattern a schema name pattern. null is used to imply no narrowing of the search using schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
typeNamePattern a type name pattern, which should match a type name as stored in the database. It may be fully qualified.
types a list of the UDT types to include in the list - one of DISTINCT , STRUCT or JAVA_OBJECT .
Returns
  • a ResultSet in the format described above.
Throws
SQLException a database error occurred.

public abstract String getURL ()

Added in API level 1

Returns the URL for this database.

Returns
  • the URL for the database. null if it cannot be generated.
Throws
SQLException a database error occurred.

public abstract String getUserName ()

Added in API level 1

Determine the user name as known by the database.

Returns
  • the user name.
Throws
SQLException a database error occurred.

public abstract ResultSet getVersionColumns ( String catalog, String schema, String table)

Added in API level 1

Returns which of a table's columns are automatically updated when any value in a row is updated.

The result is laid-out in the following columns:

  1. SCOPE - short - not used
  2. COLUMN_NAME - String - Column name
  3. DATA_TYPE - int - The SQL data type, as defined in java.sql.Types
  4. TYPE_NAME - String - The SQL type name, data source dependent
  5. COLUMN_SIZE - int - Precision for numeric types
  6. BUFFER_LENGTH - int - Length of a column value in bytes
  7. DECIMAL_DIGITS - short - Number of digits after the decimal point
  8. PSEUDO_COLUMN - short - If this is a pseudo-column (for example, an Oracle ROWID ):
    • DatabaseMetaData.bestRowUnknown - don't know whether this is a pseudo column
    • DatabaseMetaData.bestRowNotPseudo - column is not pseudo
    • DatabaseMetaData.bestRowPseudo - column is a pseudo column

Parameters
catalog a catalog name. null is used to imply no narrowing of the search using catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.
schema a schema name pattern. null is used to imply no narrowing of the search using schema names. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.
table a table name. It must match the name of a table in the database.
Returns
  • a ResultSet containing the descriptions, one row for each column, in the format defined above.
Throws
SQLException a database error occurred.

public abstract boolean insertsAreDetected (int type)

Added in API level 1

Determines whether a visible row insert can be detected by calling ResultSet.rowInserted .

Parameters
type the ResultSet type. This may be one of ResultSet.TYPE_SCROLL_SENSITIVE or ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_FORWARD_ONLY ,
Returns
  • true if ResultSet.rowInserted detects a visible row insert otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean isCatalogAtStart ()

Added in API level 1

Determine whether a fully qualified table name is prefixed or suffixed to a fully qualified table name.

Returns
  • true if the catalog appears at the start of a fully qualified table name, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean isReadOnly ()

Added in API level 1

Determines whether the database is in read-only mode.

Returns
  • true if the database is in read-only mode, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean locatorsUpdateCopy ()

Added in API level 1

Determines whether updates are made to a copy of, or directly on, Large Objects ( LOB s).

Returns
  • true if updates are made to a copy of the Large Object, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean nullPlusNonNullIsNull ()

Added in API level 1

Determines whether the database handles concatenations between NULL and non- NULL values by producing a NULL output.

Returns
  • true if NULL to non- NULL concatenations produce a NULL result, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean nullsAreSortedAtEnd ()

Added in API level 1

Determines whether NULL values are always sorted to the end of sorted results regardless of requested sort order. This means that they will appear at the end of sorted lists whatever other non- NULL values may be present.

Returns
  • true if NULL values are sorted at the end, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean nullsAreSortedAtStart ()

Added in API level 1

Determines whether NULL values are always sorted at the start of the sorted list, irrespective of the sort order. This means that they appear at the start of sorted lists, whatever other values may be present.

Returns
  • true if NULL values are sorted at the start, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean nullsAreSortedHigh ()

Added in API level 1

Determines whether NULL values are sorted high - i.e. they are sorted as if they are higher than any other values.

Returns
  • true if NULL values are sorted high, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean nullsAreSortedLow ()

Added in API level 1

Determines whether NULL values are sorted low - i.e. they are sorted as if they are lower than any other values.

Returns
  • true if NULL values are sorted low, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean othersDeletesAreVisible (int type)

Added in API level 1

Determines whether deletes made by others are visible, for a specified ResultSet type.

Parameters
type the type of the ResultSet . It may be either ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE )
Returns
  • true if others' deletes are visible, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean othersInsertsAreVisible (int type)

Added in API level 1

Determines whether inserts made by others are visible, for a specified ResultSet type.

Parameters
type the type of the ResultSet . May be ResultSet.TYPE_FORWARD_ONLY , or ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if others' inserts are visible, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean othersUpdatesAreVisible (int type)

Added in API level 1

Determines whether updates made by others are visible, for a specified ResultSet type.

Parameters
type the type of the ResultSet . May be ResultSet.TYPE_FORWARD_ONLY , or ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if others' inserts are visible, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean ownDeletesAreVisible (int type)

Added in API level 1

Determines whether a ResultSet can see its own deletes, for a specified ResultSet type.

Parameters
type the type of the ResultSet : ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if the deletes are seen by the ResultSet itself, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean ownInsertsAreVisible (int type)

Added in API level 1

Determines whether a ResultSet can see its own inserts, for a specified ResultSet type.

Parameters
type the type of the ResultSet : ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if the inserts are seen by the ResultSet itself, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean ownUpdatesAreVisible (int type)

Added in API level 1

Determines whether a ResultSet can see its own updates, for a specified ResultSet type.

Parameters
type the type of the ResultSet : ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if the updates are seen by the ResultSet itself, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean storesLowerCaseIdentifiers ()

Added in API level 1

Determines whether the database treats SQL identifiers that are in mixed case (and unquoted) as case insensitive. If true then the database stores them in lower case.

Returns
  • true if unquoted SQL identifiers are stored in lower case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean storesLowerCaseQuotedIdentifiers ()

Added in API level 1

Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in lower case.

Returns
  • true if quoted SQL identifiers are stored in lower case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean storesMixedCaseIdentifiers ()

Added in API level 1

Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.

Returns
  • true if unquoted SQL identifiers as stored in mixed case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean storesMixedCaseQuotedIdentifiers ()

Added in API level 1

Determines whether the database considers identifiers as case insensitive if they are mixed case quoted SQL. The database stores them in mixed case.

Returns
  • true if quoted SQL identifiers are stored in mixed case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean storesUpperCaseIdentifiers ()

Added in API level 1

Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.

Returns
  • true if unquoted SQL identifiers are stored in upper case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean storesUpperCaseQuotedIdentifiers ()

Added in API level 1

Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in upper case.

Returns
  • true if quoted SQL identifiers are stored in upper case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsANSI92EntryLevelSQL ()

Added in API level 1

Determines whether the database supports the ANSI92 entry level SQL grammar.

Returns
  • true if the ANSI92 entry level SQL grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsANSI92FullSQL ()

Added in API level 1

Determines whether the database supports the ANSI92 full SQL grammar.

Returns
  • true if the ANSI92 full SQL grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsANSI92IntermediateSQL ()

Added in API level 1

Determines whether the database supports the ANSI92 intermediate SQL Grammar.

Returns
  • true if the ANSI92 intermediate SQL grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsAlterTableWithAddColumn ()

Added in API level 1

Determines whether the database supports ALTER TABLE operation with ADD COLUMN .

Returns
  • true if ALTER TABLE with ADD COLUMN is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsAlterTableWithDropColumn ()

Added in API level 1

Determines whether the database supports ALTER TABLE operation with DROP COLUMN .

Returns
  • true if ALTER TABLE with DROP COLUMN is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsBatchUpdates ()

Added in API level 1

Determines whether the database supports batch updates.

Returns
  • true if batch updates are supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCatalogsInDataManipulation ()

Added in API level 1

Determines whether catalog names may be used in data manipulation statements.

Returns
  • true if catalog names can be used in data manipulation statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCatalogsInIndexDefinitions ()

Added in API level 1

Determines whether catalog names can be used in index definition statements.

Returns
  • true if catalog names can be used in index definition statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCatalogsInPrivilegeDefinitions ()

Added in API level 1

Determines whether catalog names can be used in privilege definition statements.

Returns
  • true if catalog names can be used in privilege definition statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCatalogsInProcedureCalls ()

Added in API level 1

Determines whether catalog names can be used in procedure call statements.

Returns
  • true if catalog names can be used in procedure call statements.
Throws
SQLException a database error occurred.

public abstract boolean supportsCatalogsInTableDefinitions ()

Added in API level 1

Determines whether catalog names may be used in table definition statements.

Returns
  • true if catalog names can be used in definition statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsColumnAliasing ()

Added in API level 1

Determines whether the database supports column aliasing.

If aliasing is supported, then the SQL AS clause is used to provide names for computed columns and provide alias names for columns.

Returns
  • true if column aliasing is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsConvert (int fromType, int toType)

Added in API level 1

Determines whether the database supports CONVERT operation for two supplied SQL types.

Parameters
fromType the Type to convert from, as defined by java.sql.Types
toType the Type to convert to, as defined by java.sql.Types
Returns
  • true if the CONVERT operation is supported for these types, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsConvert ()

Added in API level 1

Determines whether the database supports the CONVERT operation between SQL types.

Returns
  • true if the CONVERT operation is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCoreSQLGrammar ()

Added in API level 1

Determines whether the database supports the Core SQL Grammar for ODBC.

Returns
  • true if the Core SQL Grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsCorrelatedSubqueries ()

Added in API level 1

Determines whether the database supports correlated sub-queries.

Returns
  • true if the database does support correlated sub-queries and false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsDataDefinitionAndDataManipulationTransactions ()

Added in API level 1

Determines whether the database allows both data definition and data manipulation statements inside a transaction.

Returns
  • true if both types of statement are permitted, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsDataManipulationTransactionsOnly ()

Added in API level 1

Determines whether the database only allows data manipulation statements inside a transaction.

Returns
  • true if data manipulation statements are permitted only within a transaction, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsDifferentTableCorrelationNames ()

Added in API level 1

Determines whether table correlation names are required to be different from the names of the tables, when they are supported.

Returns
  • true if correlation names must be different from table names, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsExpressionsInOrderBy ()

Added in API level 1

Determines whether expressions in ORDER BY lists are supported.

Returns
  • true if expressions in ORDER BY lists are supported.
Throws
SQLException a database error occurred.

public abstract boolean supportsExtendedSQLGrammar ()

Added in API level 1

Determines whether the Extended SQL Grammar for ODBC is supported.

Returns
  • true if the Extended SQL Grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsFullOuterJoins ()

Added in API level 1

Determines whether the database supports full nested outer joins.

Returns
  • true if full nested outer joins are supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsGetGeneratedKeys ()

Added in API level 1

Determines whether auto generated keys can be returned when a statement executes.

Returns
  • true if auto generated keys can be returned, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsGroupBy ()

Added in API level 1

Determines whether the database supports GROUP BY clauses.

Returns
  • true if the GROUP BY clause is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsGroupByBeyondSelect ()

Added in API level 1

Determines whether the database supports using a column name in a GROUP BY clause not included in the SELECT statement as long as all of the columns in the SELECT statement are used in the GROUP BY clause.

Returns
  • true if GROUP BY clauses can use column names in this way, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsGroupByUnrelated ()

Added in API level 1

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

Returns
  • true if GROUP BY clause can use a column name not in the SELECT statement, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsIntegrityEnhancementFacility ()

Added in API level 1

Determines whether the database supports SQL Integrity Enhancement Facility.

Returns
  • true if the Integrity Enhancement Facility is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsLikeEscapeClause ()

Added in API level 1

Determines whether the database supports a LIKE escape clause.

Returns
  • true if LIKE escape clause is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsLimitedOuterJoins ()

Added in API level 1

Determines whether the database provides limited support for outer join operations.

Returns
  • true if there is limited support for outer join operations, false otherwise. This will be true if supportsFullOuterJoins returns true .
Throws
SQLException a database error occurred.

public abstract boolean supportsMinimumSQLGrammar ()

Added in API level 1

Determines whether the database supports Minimum SQL Grammar for ODBC.

Returns
  • true if the Minimum SQL Grammar is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsMixedCaseIdentifiers ()

Added in API level 1

Determines whether the database treats mixed case unquoted SQL identifiers as case sensitive storing them in mixed case.

Returns
  • true if unquoted SQL identifiers are stored in mixed case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsMixedCaseQuotedIdentifiers ()

Added in API level 1

Determines whether the database considers mixed case quoted SQL identifiers as case sensitive, storing them in mixed case.

Returns
  • true if quoted SQL identifiers are stored in mixed case, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsMultipleOpenResults ()

Added in API level 1

Determines whether it is possible for a single CallableStatement to return multiple ResultSet s simultaneously.

Returns
  • true if a single CallableStatement can return multiple ResultSet s simultaneously, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsMultipleResultSets ()

Added in API level 1

Determines whether retrieving multiple ResultSet s from a single call to the execute method is supported.

Returns
  • true if multiple ResultSet s can be retrieved, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsMultipleTransactions ()

Added in API level 1

Determines whether multiple simultaneous transactions on different connections are supported.

Returns
  • true if multiple open transactions are supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsNamedParameters ()

Added in API level 1

Determines whether callable statements with named parameters is supported.

Returns
  • true if named parameters can be used with callable statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsNonNullableColumns ()

Added in API level 1

Determines whether columns in the database can be defined as non-nullable.

Returns
  • true if columns can be defined non-nullable, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsOpenCursorsAcrossCommit ()

Added in API level 1

Determines whether keeping cursors open across commit operations is supported.

Returns
  • true if cursors can be kept open across commit operations, false if they might get closed.
Throws
SQLException a database error occurred.

public abstract boolean supportsOpenCursorsAcrossRollback ()

Added in API level 1

Determines whether the database can keep cursors open across rollback operations.

Returns
  • true if cursors can be kept open across rollback operations, false if they might get closed.
Throws
SQLException a database error occurred.

public abstract boolean supportsOpenStatementsAcrossCommit ()

Added in API level 1

Determines whether keeping statements open across commit operations is supported.

Returns
  • true if statements can be kept open, false if they might not.
Throws
SQLException a database error occurred.

public abstract boolean supportsOpenStatementsAcrossRollback ()

Added in API level 1

Determines whether keeping statements open across rollback operations is supported.

Returns
  • true if statements can be kept open, false if they might not.
Throws
SQLException a database error occurred.

public abstract boolean supportsOrderByUnrelated ()

Added in API level 1

Determines whether using a column in an ORDER BY clause that is not in the SELECT statement is supported.

Returns
  • true if it is possible to ORDER using a column not in the SELECT , false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsOuterJoins ()

Added in API level 1

Determines whether outer join operations are supported.

Returns
  • true if outer join operations are supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsPositionedDelete ()

Added in API level 1

Determines whether positioned DELETE statements are supported.

Returns
  • true if the database supports positioned DELETE statements.
Throws
SQLException a database error occurred.

public abstract boolean supportsPositionedUpdate ()

Added in API level 1

Determines whether positioned UPDATE statements are supported.

Returns
  • true if the database supports positioned UPDATE statements, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsResultSetConcurrency (int type, int concurrency)

Added in API level 1

Determines whether there is support for a given concurrency style for the given ResultSet .

Parameters
type the ResultSet type, as defined in java.sql.ResultSet :
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
concurrency a concurrency type, which may be one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE .
Returns
  • true if that concurrency and ResultSet type pairing is supported otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsResultSetHoldability (int holdability)

Added in API level 1

Determines whether the supplied ResultSet holdability mode is supported.

Parameters
holdability as specified in java.sql.ResultSet : ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Returns
  • true if the given ResultSet holdability is supported and if it isn't then false .
Throws
SQLException a database error occurred.

public abstract boolean supportsResultSetType (int type)

Added in API level 1

Determines whether the supplied ResultSet type is supported.

Parameters
type the ResultSet type as defined in java.sql.ResultSet : ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true if the ResultSet type is supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsSavepoints ()

Added in API level 1

Determines whether savepoints for transactions are supported.

Returns
  • true if savepoints are supported, false otherwise.
Throws
SQLException a database error occurred.

public abstract boolean supportsSchemasInDataManipulation ()

Added in API level 1

Determines whether a schema name may be used in a data manipulation statement.

Returns
  • true if a schema name can be used in a data manipulation, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSchemasInIndexDefinitions ()

Added in API level 1

Determines whether a schema name may be used in an index definition statement.

Returns
  • true if a schema name can be used in an index definition, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSchemasInPrivilegeDefinitions ()

Added in API level 1

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

Returns
  • true if a database schema name may be used in a privilege definition, otherwise false
Throws
SQLException a database error occurred.

public abstract boolean supportsSchemasInProcedureCalls ()

Added in API level 1

Determines whether a procedure call statement may be contain in a schema name.

Returns
  • true if a schema name can be used in a procedure call, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSchemasInTableDefinitions ()

Added in API level 1

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

Returns
  • true if a schema name can be used in a table definition, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSelectForUpdate ()

Added in API level 1

Determines whether the SELECT FOR UPDATE statement is supported.

Returns
  • true if SELECT FOR UPDATE statements are supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsStatementPooling ()

Added in API level 1

Determines whether statement pooling is supported.

Returns
  • true of the database does support statement pooling, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsStoredFunctionsUsingCallSyntax ()

Added in API level 9

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

Returns
  • true if this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.
Throws
SQLException if any error occurs

public abstract boolean supportsStoredProcedures ()

Added in API level 1

Determines whether stored procedure calls using the stored procedure escape syntax is supported.

Returns
  • true if stored procedure calls using the stored procedure escape syntax are supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSubqueriesInComparisons ()

Added in API level 1

Determines whether subqueries in comparison expressions are supported.

Returns
  • true if subqueries are supported in comparison expressions.
Throws
SQLException a database error occurred.

public abstract boolean supportsSubqueriesInExists ()

Added in API level 1

Determines whether subqueries in EXISTS expressions are supported.

Returns
  • true if subqueries are supported in EXISTS expressions, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSubqueriesInIns ()

Added in API level 1

Determines whether subqueries in IN statements are supported.

Returns
  • true if subqueries are supported in IN statements, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsSubqueriesInQuantifieds ()

Added in API level 1

Determines whether subqueries in quantified expressions are supported.

Returns
  • true if subqueries are supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsTableCorrelationNames ()

Added in API level 1

Determines whether the database has table correlation names support.

Returns
  • true if table correlation names are supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsTransactionIsolationLevel (int level)

Added in API level 1

Determines whether a specified transaction isolation level is supported.

Parameters
level the transaction isolation level, as specified in java.sql.Connection : TRANSACTION_NONE , TRANSACTION_READ_COMMITTED , TRANSACTION_READ_UNCOMMITTED , TRANSACTION_REPEATABLE_READ , TRANSACTION_SERIALIZABLE
Returns
  • true if the specific isolation level is supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsTransactions ()

Added in API level 1

Determines whether transactions are supported.

If transactions are not supported, then the commit method does nothing and the transaction isolation level is always TRANSACTION_NONE .

Returns
  • true if transactions are supported, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsUnion ()

Added in API level 1

Determines whether the SQL UNION operation is supported.

Returns
  • true of the database does support UNION , otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean supportsUnionAll ()

Added in API level 1

Determines whether the SQL UNION ALL operation is supported.

Returns
  • true if the database does support UNION ALL , otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean updatesAreDetected (int type)

Added in API level 1

Determines whether the method ResultSet.rowUpdated can detect a visible row update for the specified ResultSet type.

Parameters
type ResultSet type: ResultSet.TYPE_FORWARD_ONLY , ResultSet.TYPE_SCROLL_INSENSITIVE , or ResultSet.TYPE_SCROLL_SENSITIVE
Returns
  • true detecting changes is possible, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean usesLocalFilePerTable ()

Added in API level 1

Determines whether this database uses a file for each table.

Returns
  • true if the database uses one file for each table, otherwise false .
Throws
SQLException a database error occurred.

public abstract boolean usesLocalFiles ()

Added in API level 1

Determines whether this database uses a local file to store tables.

Returns
  • true if the database stores tables in a local file, otherwise false .
Throws
SQLException a database error occurred.