java.sql.DatabaseMetaData
2012-02-15 17:03
281 查看
public interface DatabaseMetaData
Comprehensive information about the database as a whole.
This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBC technology ("JDBC driver") that is used with it. Different
relational DBMSs often support different features, implement features in different ways, and use different data types. In addition, a driver may implement a feature on top of what the DBMS offers. Information returned by methods in this interface applies to
the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation, the term "database" is used generically to refer to both the driver and DBMS.
A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example, a tool might use
the method getTypeInfo to find out what data types can be used in a CREATE TABLE statement. Or a user might callthe method
supportsCorrelatedSubqueries to see if it is possible to use a correlated subquery orsupportsBatchUpdates
to see if it is possible to use batch updates.
Some DatabaseMetaData methods return lists of information in the form of ResultSet objects. Regular ResultSet methods, such as getString and getInt, can be used to retrieve the data from these ResultSet objects. If a given form of metadata is not available,
the ResultSet getter methods throw an SQLException.
Some DatabaseMetaData methods take arguments that are String patterns. These arguments all have names such as fooPattern.Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one
character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null, that argument's criterion will be dropped from the search.
A method that gets information about a feature that the driver does not support will throw an SQLException. In the case of methods that return a ResultSet object, either a ResultSet object (which may be empty) is returned or an SQLException is thrown.
Comprehensive information about the database as a whole.
This interface is implemented by driver vendors to let users know the capabilities of a Database Management System (DBMS) in combination with the driver based on JDBC technology ("JDBC driver") that is used with it. Different
relational DBMSs often support different features, implement features in different ways, and use different data types. In addition, a driver may implement a feature on top of what the DBMS offers. Information returned by methods in this interface applies to
the capabilities of a particular driver and a particular DBMS working together. Note that as used in this documentation, the term "database" is used generically to refer to both the driver and DBMS.
A user for this interface is commonly a tool that needs to discover how to deal with the underlying DBMS. This is especially true for applications that are intended to be used with more than one DBMS. For example, a tool might use
the method getTypeInfo to find out what data types can be used in a CREATE TABLE statement. Or a user might callthe method
supportsCorrelatedSubqueries to see if it is possible to use a correlated subquery orsupportsBatchUpdates
to see if it is possible to use batch updates.
Some DatabaseMetaData methods return lists of information in the form of ResultSet objects. Regular ResultSet methods, such as getString and getInt, can be used to retrieve the data from these ResultSet objects. If a given form of metadata is not available,
the ResultSet getter methods throw an SQLException.
Some DatabaseMetaData methods take arguments that are String patterns. These arguments all have names such as fooPattern.Within a pattern String, "%" means match any substring of 0 or more characters, and "_" means match any one
character. Only metadata entries matching the search pattern are returned. If a search pattern argument is set to null, that argument's criterion will be dropped from the search.
A method that gets information about a feature that the driver does not support will throw an SQLException. In the case of methods that return a ResultSet object, either a ResultSet object (which may be empty) is returned or an SQLException is thrown.
相关文章推荐
- java.sql.DatabaseMetaData接口的用法
- 关于在配置hibernate.cfg.xml时弹出的错误Unable to access java.sql.DatabaseMetaData to determine appropriate Dial
- 求解?Unable to access java.sql.DatabaseMetaData to determine appropriate Dialect to use
- Java Exception : Fatal Error. Unable to initialize DatabaseMetaData class.和Non SQL Error : Could not load class com.mysql.jdbc.D
- Hibernate3.2与Sql连接时出现的--java.lang.AbstractMethodError: com.microsoft.jdbc.base.BaseDatabaseMetaData.supportsGetGeneratedKeys()Z
- DatabaseMetaData获取数据库信息和表信息(表的列名,类型,主键等)SQL java
- java.sql.DatabaseMetaData接口的用法
- Java中DatabaseMetaData 元数据信息
- Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDyna
- 关于java.sql.SQLException: Connections could not be acquired from the underlying database!
- Caused by: java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.locatorsUpdateCo
- java.lang.AbstractMethodError: com.microsoft.jdbc.base.BaseDatabaseMetaData.supportsGetGeneratedKeys()Z
- ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set
- java.sql Interface ResultSetMetaData
- FAQ(12):Error querying database. Cause: java.sql.SQLException
- Error updating database. Cause: java.sql.BatchUpdateException: Field 'id' doesn't have a default value
- ### Error updating database. Cause: java.sql.SQLException: ORA-01722: 无效数字
- [mssql-jdbc故障]java.lang.AbstractMethodError: com.microsoft.jdbc.base.BaseDatabaseMetaData.supportsGe
- java DatabaseMetaData
- java.sql.SQLException: Connections could not be acquired from the underlying database!