java.sql.DatabaseMetaData
java.sql.DatabaseMetaData是数据库对象定义接口,具体信息如表1所示。
| 方法名 | 返回值类型 | 是否支持 |
|---|---|---|
| allProceduresAreCallable() | BOOLEAN | Yes |
| allTablesAreSelectable() | BOOLEAN | Yes |
| autoCommitFailureClosesAllResultSets() | BOOLEAN | Yes |
| dataDefinitionCausesTransactionCommit() | BOOLEAN | Yes |
| dataDefinitionIgnoredInTransactions() | BOOLEAN | Yes |
| deletesAreDetected(int type) | BOOLEAN | Yes |
| doesMaxRowSizeIncludeBlobs() | BOOLEAN | Yes |
| generatedKeyAlwaysReturned() | BOOLEAN | Yes |
| getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) | RESULTSET | Yes |
| getCatalogs() | RESULTSET | Yes |
| getCatalogSeparator() | STRING | Yes |
| getCatalogTerm() | STRING | Yes |
| getClientInfoProperties() | RESULTSET | Yes |
| getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) | RESULTSET | No |
| getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) | RESULTSET | No |
| getConnection() | CONNECTION | Yes |
| getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) | RESULTSET | No |
| getDatabaseMajorVersion() | INT | Yes |
| getDatabaseMinorVersion() | INT | Yes |
| getDatabaseProductName() | STRING | Yes |
| getDatabaseProductVersion() | STRING | Yes |
| getDefaultTransactionIsolation() | INT | Yes |
| getDriverMajorVersion() | INT | Yes |
| getDriverMinorVersion() | INT | Yes |
| getDriverName() | STRING | Yes |
| getDriverVersion() | STRING | Yes |
| getExportedKeys(String catalog, String schema, String table) | RESULTSET | No |
| getExtraNameCharacters() | STRING | Yes |
| getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) | RESULTSET | No |
| getFunctions(String catalog, String schemaPattern, String functionNamePattern) | RESULTSET | No |
| getIdentifierQuoteString() | STRING | Yes |
| getImportedKeys(String catalog, String schema, String table) | RESULTSET | No |
| getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) | RESULTSET | Yes |
| getJDBCMajorVersion() | INT | Yes |
| getJDBCMinorVersion() | INT | Yes |
| getMaxBinaryLiteralLength() | INT | Yes |
| getMaxCatalogNameLength() | INT | Yes |
| getMaxCharLiteralLength() | INT | Yes |
| getMaxColumnNameLength() | INT | Yes |
| getMaxColumnsInGroupBy() | INT | Yes |
| getMaxColumnsInIndex() | INT | Yes |
| getMaxColumnsInOrderBy() | INT | Yes |
| getMaxColumnsInSelect() | INT | Yes |
| getMaxColumnsInTable() | INT | Yes |
| getMaxConnections() | INT | Yes |
| getMaxCursorNameLength() | INT | Yes |
| getMaxIndexLength() | INT | Yes |
| getMaxLogicalLobSize() | DEFAULT LONG | Yes |
| getMaxProcedureNameLength() | INT | Yes |
| getMaxRowSize() | INT | Yes |
| getMaxSchemaNameLength() | INT | Yes |
| getMaxStatementLength() | INT | Yes |
| getMaxStatements() | INT | Yes |
| getMaxTableNameLength() | INT | Yes |
| getMaxTablesInSelect() | INT | Yes |
| getMaxUserNameLength() | INT | Yes |
| getNumericFunctions() | STRING | Yes |
| getPrimaryKeys(String catalog, String schema, String table) | RESULTSET | Yes |
| getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) | RESULTSET | No |
| getProcedures(String catalog, String schemaPattern, String procedureNamePattern) | RESULTSET | No |
| getProcedureTerm() | STRING | Yes |
| getResultSetHoldability() | INT | Yes |
| getSchemas() | RESULTSET | Yes |
| getSchemas(String catalog, String schemaPattern) | RESULTSET | Yes |
| getSchemaTerm() | STRING | Yes |
| getSearchStringEscape() | STRING | Yes |
| getSQLKeywords() | STRING | Yes |
| getSQLStateType() | INT | Yes |
| getStringFunctions() | STRING | Yes |
| getSystemFunctions() | STRING | Yes |
| getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) | RESULTSET | No |
| getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) | RESULTSET | No |
| getTableTypes() | RESULTSET | Yes |
| getTimeDateFunctions() | STRING | Yes |
| getTypeInfo() | RESULTSET | Yes |
| getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) | RESULTSET | Yes |
| getURL() | STRING | Yes |
| getUserName() | STRING | No |
| getVersionColumns(String catalog, String schema, String table) | RESULTSET | Yes |
| insertsAreDetected(int type) | BOOLEAN | Yes |
| isCatalogAtStart() | BOOLEAN | Yes |
| isReadOnly() | BOOLEAN | Yes |
| locatorsUpdateCopy() | BOOLEAN | Yes |
| nullPlusNonNullIsNull() | BOOLEAN | Yes |
| nullsAreSortedAtEnd() | BOOLEAN | Yes |
| nullsAreSortedAtStart() | BOOLEAN | Yes |
| nullsAreSortedHigh() | BOOLEAN | Yes |
| nullsAreSortedLow() | BOOLEAN | Yes |
| othersDeletesAreVisible(int type) | BOOLEAN | Yes |
| othersInsertsAreVisible(int type) | BOOLEAN | Yes |
| othersUpdatesAreVisible(int type) | BOOLEAN | Yes |
| ownDeletesAreVisible(int type) | BOOLEAN | Yes |
| ownInsertsAreVisible(int type) | BOOLEAN | Yes |
| ownUpdatesAreVisible(int type) | BOOLEAN | Yes |
| storesLowerCaseIdentifiers() | BOOLEAN | Yes |
| storesLowerCaseQuotedIdentifiers() | BOOLEAN | Yes |
| storesMixedCaseIdentifiers() | BOOLEAN | Yes |
| storesMixedCaseQuotedIdentifiers() | BOOLEAN | Yes |
| storesUpperCaseIdentifiers() | BOOLEAN | Yes |
| storesUpperCaseQuotedIdentifiers() | BOOLEAN | Yes |
| supportsAlterTableWithAddColumn() | BOOLEAN | Yes |
| supportsAlterTableWithDropColumn() | BOOLEAN | Yes |
| supportsANSI92EntryLevelSQL() | BOOLEAN | Yes |
| supportsANSI92FullSQL() | BOOLEAN | Yes |
| supportsANSI92IntermediateSQL() | BOOLEAN | Yes |
| supportsBatchUpdates() | BOOLEAN | Yes |
| supportsCatalogsInDataManipulation() | BOOLEAN | Yes |
| supportsCatalogsInIndexDefinitions() | BOOLEAN | Yes |
| supportsCatalogsInPrivilegeDefinitions() | BOOLEAN | Yes |
| supportsCatalogsInProcedureCalls() | BOOLEAN | Yes |
| supportsCatalogsInTableDefinitions() | BOOLEAN | Yes |
| supportsColumnAliasing() | BOOLEAN | Yes |
| supportsConvert() | BOOLEAN | Yes |
| supportsConvert(int fromType, int toType) | BOOLEAN | Yes |
| supportsCoreSQLGrammar() | BOOLEAN | Yes |
| supportsCorrelatedSubqueries() | BOOLEAN | Yes |
| supportsDataDefinitionAndDataManipulationTransactions() | BOOLEAN | Yes |
| supportsDataManipulationTransactionsOnly() | BOOLEAN | Yes |
| supportsDifferentTableCorrelationNames() | BOOLEAN | Yes |
| supportsExpressionsInOrderBy() | BOOLEAN | Yes |
| supportsExtendedSQLGrammar() | BOOLEAN | Yes |
| supportsFullOuterJoins() | BOOLEAN | Yes |
| supportsGetGeneratedKeys() | BOOLEAN | Yes |
| supportsGroupBy() | BOOLEAN | Yes |
| supportsGroupByBeyondSelect() | BOOLEAN | Yes |
| supportsGroupByUnrelated() | BOOLEAN | Yes |
| supportsIntegrityEnhancementFacility() | BOOLEAN | Yes |
| supportsLikeEscapeClause() | BOOLEAN | Yes |
| supportsLimitedOuterJoins() | BOOLEAN | Yes |
| supportsMinimumSQLGrammar() | BOOLEAN | Yes |
| supportsMixedCaseIdentifiers() | BOOLEAN | Yes |
| supportsMixedCaseIdentifiers() | BOOLEAN | Yes |
| supportsMixedCaseQuotedIdentifiers() | BOOLEAN | Yes |
| supportsMultipleOpenResults() | BOOLEAN | Yes |
| supportsMultipleResultSets() | BOOLEAN | Yes |
| supportsMultipleTransactions() | BOOLEAN | Yes |
| supportsNamedParameters() | BOOLEAN | Yes |
| supportsNonNullableColumns() | BOOLEAN | Yes |
| supportsOpenCursorsAcrossCommit() | BOOLEAN | Yes |
| supportsOpenCursorsAcrossRollback() | BOOLEAN | Yes |
| supportsOpenStatementsAcrossCommit() | BOOLEAN | Yes |
| supportsOpenStatementsAcrossRollback() | BOOLEAN | Yes |
| supportsOrderByUnrelated() | BOOLEAN | Yes |
| supportsOuterJoins() | BOOLEAN | Yes |
| supportsPositionedDelete() | BOOLEAN | Yes |
| supportsPositionedUpdate() | BOOLEAN | Yes |
| supportsResultSetConcurrency(int type, int concurrency) | BOOLEAN | Yes |
| supportsResultSetHoldability(int holdability) | BOOLEAN | Yes |
| supportsResultSetType(int type) | BOOLEAN | Yes |
| supportsSavepoints() | BOOLEAN | Yes |
| supportsSchemasInDataManipulation() | BOOLEAN | Yes |
| supportsSchemasInIndexDefinitions() | BOOLEAN | Yes |
| supportsSchemasInPrivilegeDefinitions() | BOOLEAN | Yes |
| supportsSchemasInProcedureCalls() | BOOLEAN | Yes |
| supportsSchemasInTableDefinitions() | BOOLEAN | Yes |
| supportsSelectForUpdate() | BOOLEAN | Yes |
| supportsStatementPooling() | BOOLEAN | Yes |
| supportsStoredFunctionsUsingCallSyntax() | BOOLEAN | Yes |
| supportsStoredProcedures() | BOOLEAN | Yes |
| supportsSubqueriesInComparisons() | BOOLEAN | Yes |
| supportsSubqueriesInExists() | BOOLEAN | Yes |
| supportsSubqueriesInIns() | BOOLEAN | Yes |
| supportsSubqueriesInQuantifieds() | BOOLEAN | Yes |
| supportsTableCorrelationNames() | BOOLEAN | Yes |
| supportsTransactionIsolationLevel(int level) | BOOLEAN | Yes |
| supportsTransactions() | BOOLEAN | Yes |
| supportsUnion() | BOOLEAN | Yes |
| supportsUnionAll() | BOOLEAN | Yes |
| updatesAreDetected(int type) | BOOLEAN | Yes |
| usesLocalFilePerTable() | BOOLEAN | Yes |
| usesLocalFiles() | BOOLEAN | Yes |