Module java.sql

Package java.sql


package java.sql
Provides the API for accessing and processing data stored in a data source (usually a relational database) using the Java programming language.提供使用Java编程语言访问和处理存储在数据源(通常是关系数据库)中的数据的API。This API includes a framework whereby different drivers can be installed dynamically to access different data sources.这个API包含一个框架,通过这个框架可以动态安装不同的驱动程序来访问不同的数据源。Although the JDBC API is mainly geared to passing SQL statements to a database, it provides for reading and writing data from any data source with a tabular format.尽管JDBC API主要用于向数据库传递SQL语句,但它提供了以表格格式从任何数据源读取和写入数据的功能。The reader/writer facility, available through the javax.sql.RowSet group of interfaces, can be customized to use and update data from a spread sheet, flat file, or any other tabular data source.通过javax.sql.RowSet接口组提供的reader/writer工具可以定制为使用和更新来自电子表格、平面文件或任何其他表格数据源的数据。

What the JDBC 4.3 API IncludesJDBC 4.3 API包括什么

The JDBC 4.3 API includes both the java.sql package, referred to as the JDBC core API, and the javax.sql package, referred to as the JDBC Optional Package API.JDBC 4.3 API包括java.sql包(称为JDBC核心API)和javax.sql包(称为JDBC可选包API)。This complete JDBC API is included in the Java Standard Edition (Java SE), version 7.这个完整的JDBC API包含在Java标准版(Java SE)第7版中。The javax.sql package extends the functionality of the JDBC API from a client-side API to a server-side API, and it is an essential part of the Java Enterprise Edition (Java EE) technology.java.sql包将JDBC API的功能从客户端API扩展到服务器端API,它是Java企业版(JavaEE)技术的重要组成部分。

Versions版本

The JDBC 4.3 API incorporates all of the previous JDBC API versions:JDBC 4.3 API包含了所有以前的JDBC API版本:
  • The JDBC 4.2 API
  • The JDBC 4.1 API
  • The JDBC 4.0 API
  • The JDBC 3.0 API
  • The JDBC 2.1 core API
  • The JDBC 2.0 Optional Package APIJDBC2.0可选包API
    (Note that the JDBC 2.1 core API and the JDBC 2.0 Optional Package API together are referred to as the JDBC 2.0 API.)(请注意,JDBC 2.1核心API和JDBC 2.0可选包API一起被称为JDBC 2.0 API。)
  • The JDBC 1.2 API
  • The JDBC 1.0 API

Classes, interfaces, methods, fields, constructors, and exceptions have the following "since" tags that indicate when they were introduced into the Java platform.类、接口、方法、字段、构造函数和异常具有以下“since”标记,指示它们是何时引入Java平台的。When these "since" tags are used in Javadoc comments for the JDBC API, they indicate the following:在JDBC API的Javadoc注释中使用这些“因为”标记时,它们表示以下内容:

  • Since 9 -- new in the JDBC 4.3 API and part of the Java SE platform, version 9JDBC 4.3 API中的新功能,是JavaSE平台版本9的一部分
  • Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform, version 8JDBC 4.2 API中的新功能,是JavaSE平台版本8的一部分
  • Since 1.7 -- new in the JDBC 4.1 API and part of the Java SE platform, version 7JDBC 4.1 API中的新功能,是JavaSE平台版本7的一部分
  • Since 1.6 -- new in the JDBC 4.0 API and part of the Java SE platform, version 6JDBC 4.0 API中的新功能,是JavaSE平台版本6的一部分
  • Since 1.4 -- new in the JDBC 3.0 API and part of the J2SE platform, version 1.4JDBC 3.0 API中的新功能,是J2SE平台1.4版的一部分
  • Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform, version 1.2JDBC 2.0 API中的新功能,是J2SE平台1.2版的一部分
  • Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of the JDK, version 1.1在原始的JDBC1.0API和JDK的一部分,版本1.1中

NOTE:注: Many of the new features are optional; consequently, there is some variation in drivers and the features they support.许多新特性是可选的;因此,驱动程序及其支持的功能存在一些差异。Always check your driver's documentation to see whether it supports a feature before you try to use it.在您尝试使用某个功能之前,请务必查看您的驱动程序文档,看看它是否支持该功能。

NOTE:注: The class SQLPermission was added in the Java 2 SDK, Standard Edition, version 1.3 release.SQLPermission类是在Java2SDK标准版1.3版本中添加的。This class is used to prevent unauthorized access to the logging stream associated with the DriverManager, which may contain information such as table names, column data, and so on.此类用于防止未经授权访问与DriverManager关联的日志流,该日志流可能包含表名、列数据等信息。

What the java.sql Package Containsjava.sql包包含的内容

The java.sql package contains API for the following:java.sql包包含以下API:
  • Making a connection with a database via the DriverManager facility 通过DriverManager工具与数据库建立连接
    • DriverManager class -- makes a connection with a driver DriverManager类--与驱动程序建立连接
    • SQLPermission class -- provides permission when code running within a Security Manager, such as an applet, attempts to set up a logging stream through the DriverManagerSQLPermission类--在安全管理器(如小程序)中运行的代码试图通过DriverManager设置日志流时提供权限
    • Driver interface -- provides the API for registering and connecting drivers based on JDBC technology ("JDBC drivers"); generally used only by the DriverManager classDriver接口--提供基于JDBC技术注册和连接驱动程序的API(“JDBC驱动程序”);通常仅由DriverManager类使用
    • DriverPropertyInfo class -- provides properties for a JDBC driver; not used by the general userDriverPropertyInfo类--提供JDBC驱动程序的属性;一般用户不使用
  • Sending SQL statements to a database 向数据库发送SQL语句
    • Statement -- used to send basic SQL statements--用于发送基本SQL语句
    • PreparedStatement -- used to send prepared statements or basic SQL statements (derived from Statement)--用于发送准备好的语句或基本SQL语句(从Statement派生)
    • CallableStatement -- used to call database stored procedures (derived from PreparedStatement)--用于调用数据库存储过程(从PreparedStatement派生)
    • Connection interface -- provides methods for creating statements and managing connections and their properties接口--提供用于创建语句和管理连接及其属性的方法
    • Savepoint -- provides savepoints in a transaction--在事务中提供保存点
  • Retrieving and updating the results of a query检索和更新查询结果
    • ResultSet interface接口
  • Standard mappings for SQL types to classes and interfaces in the Java programming languageJava编程语言中SQL类型到类和接口的标准映射
    • Array interface -- mapping for SQL ARRAY接口--SQLARRAY的映射
    • Blob interface -- mapping for SQL BLOB接口--SQL BLOB的映射
    • Clob interface -- mapping for SQL CLOB接口--SQL CLOB的映射
    • Date class -- mapping for SQL DATE类--SQLDATE的映射
    • NClob interface -- mapping for SQL NCLOB接口--SQL NCLOB的映射
    • Ref interface -- mapping for SQL REF接口--SQL REF的映射
    • RowId interface -- mapping for SQL ROWID接口--SQL ROWID的映射
    • Struct interface -- mapping for SQL STRUCT接口--SQLSTRUCT的映射
    • SQLXML interface -- mapping for SQL XML接口--SQLXML的映射
    • Time class -- mapping for SQL TIME类--SQLTIME的映射
    • Timestamp class -- mapping for SQL TIMESTAMP类--SQLTIMESTAMP的映射
    • Types class -- provides constants for SQL types类--为SQL类型提供常量
  • Custom mapping an SQL user-defined type (UDT) to a class in the Java programming language 自定义将SQL用户定义类型(UDT)映射到Java编程语言中的类
    • SQLData interface -- specifies the mapping of a UDT to an instance of this class接口--指定UDT到此类实例的映射
    • SQLInput interface -- provides methods for reading UDT attributes from a stream接口--提供从流中读取UDT属性的方法
    • SQLOutput interface -- provides methods for writing UDT attributes back to a stream接口--提供将UDT属性写回流的方法
  • Metadata元数据
    • DatabaseMetaData interface -- provides information about the databaseDatabaseMetaData接口--提供有关数据库的信息
    • ResultSetMetaData interface -- provides information about the columns of a ResultSet objectResultSetMetaData接口--提供有关ResultSet对象的列的信息
    • ParameterMetaData interface -- provides information about the parameters to PreparedStatement commandsParameterMetaData接口--提供有关PreparedStatement命令参数的信息
  • Exceptions异常
    • SQLException -- thrown by most methods when there is a problem accessing data and by some methods for other reasons--大多数方法在访问数据时抛出,有些方法由于其他原因抛出
    • SQLWarning -- thrown to indicate a warning--抛出以表示警告
    • DataTruncation -- thrown to indicate that data may have been truncated--抛出以指示数据可能已被截断
    • BatchUpdateException -- thrown to indicate that not all commands in a batch update executed successfully--抛出以指示批处理更新中并非所有命令都已成功执行

java.sql and javax.sql Features Introduced in the JDBC 4.3 APIJDBC4.3API中引入的java.sqljavax.sql特性

  • Added Sharding support增加了Sharding支持
  • Enhanced Connection to be able to provide hints to the driver that a request, an independent unit of work, is beginning or ending增强的Connection,能够向驱动程序提示请求(一个独立的工作单元)正在开始或结束
  • Enhanced DatabaseMetaData to determine if Sharding is supported增强的DatabaseMetaData,用于确定是否支持分片
  • Added the method drivers to DriverManager to return a Stream of the currently loaded and available JDBC driversdrivers方法添加到DriverManager,以返回当前加载的可用JDBC驱动程序流
  • Added support to Statement for enquoting literals and simple identifiers添加了对Statement的支持,以支持加引号的文本和简单标识符
  • Clarified the Java SE version that methods were deprecated澄清了已弃用方法的Java SE版本

java.sql and javax.sql Features Introduced in the JDBC 4.2 APIJDBC 4.2 API中引入的java.sqljavax.sql特性

  • Added JDBCType enum and SQLType interface添加了JDBCType枚举和SQLType接口
  • Support for REF CURSORS in CallableStatementCallableStatement中对REF CURSORS的支持
  • DatabaseMetaData methods to return maximum Logical LOB size and if Ref Cursors are supported返回最大逻辑LOB大小和是否支持Ref游标的DatabaseMetaData方法
  • Added support for large update counts增加了对大型更新计数的支持

java.sql and javax.sql Features Introduced in the JDBC 4.1 APIJDBC 4.1 API中引入的java.sqljavax.sql特性

  • Allow Connection, ResultSet and Statement objects to be used with the try-with-resources statement允许ConnectionResultSetStatement对象与try-with-resources语句一起使用
  • Support added to CallableStatement and ResultSet to specify the Java type to convert to via the getObject method添加到CallableStatementResultSet的支持,以通过getObject方法指定要转换为的Java类型
  • DatabaseMetaData methods to return PseudoColumns and if a generated key is always returnedDatabaseMetaData方法返回伪列,以及是否始终返回生成的键
  • Added support to Connection to specify a database schema, abort and timeout a physical connection.添加了对Connection的支持,以指定数据库架构、中止和超时物理连接。
  • Added support to close a Statement object when its dependent objects have been closed添加了在关闭依赖对象时关闭Statement对象的支持
  • Support for obtaining the parent logger for a Driver, DataSource, ConnectionPoolDataSource and XADataSource支持获取DriverDataSourceConnectionPoolDataSourceXADataSource的父记录器

java.sql and javax.sql Features Introduced in the JDBC 4.0 APIJDBC 4.0 API中引入的java.sqljavax.sql特性

  • auto java.sql.Driver discovery自动java.sql.Driver发现 -- no longer need to load a java.sql.Driver class via Class.forName 不再需要通过class.forName加载java.sql.Driver
  • National Character Set support added添加了国家字符集支持
  • Support added for the SQL:2003 XML data type添加了对SQL:2003 XML数据类型的支持
  • SQLException enhancements -- Added support for cause chaining; New SQLExceptions added for common SQLState class value codesSQLException增强--增加了对原因链接的支持;为常见的SQLState类值代码添加了新的SQLExceptions
  • Enhanced Blob/Clob functionality -- Support provided to create and free a Blob/Clob instance as well as additional methods added to improve accessibility增强的Blob/Clob功能--提供了创建和释放Blob/Clob实例的支持,并添加了其他方法以提高可访问性
  • Support added for accessing a SQL ROWID 添加了对访问SQL ROWID的支持
  • Support added to allow a JDBC application to access an instance of a JDBC resource that has been wrapped by a vendor, usually in an application server or connection pooling environment.添加的支持允许JDBC应用程序访问由供应商包装的JDBC资源实例,通常在应用程序服务器或连接池环境中。
  • Availability to be notified when a PreparedStatement that is associated with a PooledConnection has been closed or the driver determines is invalidPooledConnection关联的PreparedStatement已关闭或驱动程序确定无效时通知的可用性

java.sql and javax.sql Features Introduced in the JDBC 3.0 APIJDBC 3.0 API中引入的java.sqljavax.sql特性

  • Pooled statements -- reuse of statements associated with a pooled connection池语句--重用与池连接关联的语句
  • Savepoints -- allow a transaction to be rolled back to a designated savepoint保存点--允许事务回滚到指定的保存点
  • Properties defined for ConnectionPoolDataSource -- specify how connections are to be pooledConnectionPoolDataSource定义的属性--指定如何池化连接
  • Metadata for parameters of a PreparedStatement objectPreparedStatement对象参数的元数据
  • Ability to retrieve values from automatically generated columns能够从自动生成的列中检索值
  • Ability to have multiple ResultSet objects returned from CallableStatement objects open at the same time能够同时打开从CallableStatement对象返回的多个ResultSet对象
  • Ability to identify parameters to CallableStatement objects by name as well as by index能够通过名称和索引识别CallableStatement对象的参数
  • ResultSet holdability -- ability to specify whether cursors should be held open or closed at the end of a transactionResultSet holdability--指定游标在事务结束时应保持打开还是关闭的功能
  • Ability to retrieve and update the SQL structured type instance that a Ref object references能够检索和更新Ref对象引用的SQL结构化类型实例
  • Ability to programmatically update BLOB, CLOB, ARRAY, and REF values.能够以编程方式更新BLOBCLOBARRAYREF值。
  • Addition of the java.sql.Types.DATALINK data type -- allows JDBC drivers access to objects stored outside a data source添加java.sql.Types.DATALINK数据类型--允许JDBC驱动程序访问存储在数据源外部的对象
  • Addition of metadata for retrieving SQL type hierarchies添加用于检索SQL类型层次结构的元数据

java.sql Features Introduced in the JDBC 2.1 Core APIJDBC 2.1核心API中引入的java.sql特性

  • Scrollable result sets--using new methods in the ResultSet interface that allow the cursor to be moved to a particular row or to a position relative to its current position 可滚动结果集--在ResultSet界面中使用新方法,允许将光标移动到特定行或相对于其当前位置的位置
  • Batch updates批量更新
  • Programmatic updates--using ResultSet updater methods编程更新--使用ResultSet更新程序方法
  • New data types--interfaces mapping the SQL3 data types新的数据类型--映射SQL3数据类型的接口
  • Custom mapping of user-defined types (UDTs)用户定义类型(UDT)的自定义映射
  • Miscellaneous features, including performance hints, the use of character streams, full precision for java.math.BigDecimal values, additional security, and support for time zones in date, time, and timestamp values.其他功能,包括性能提示、字符流的使用、java.math.BigDecimal值的完全精度、额外的安全性,以及对日期、时间和时间戳值时区的支持。

javax.sql Features Introduced in the JDBC 2.0 Optional Package APIJDBC 2.0可选包API中引入的javax.sql特性

  • The DataSource interface as a means of making a connection. DataSource接口作为建立连接的手段。The Java Naming and Directory Interface (JNDI) is used for registering a DataSource object with a naming service and also for retrieving it.Java命名和目录接口(JNDI)用于向命名服务注册DataSource对象并检索它。
  • Pooled connections -- allowing connections to be used and reused池连接--允许使用和重用连接
  • Distributed transactions -- allowing a transaction to span diverse DBMS servers分布式事务--允许事务跨越不同的DBMS服务器
  • RowSet technology -- providing a convenient means of handling and passing dataRowSet--提供一种方便的数据处理和传递方法

Custom Mapping of UDTs自定义UDT映射

A user-defined type (UDT) defined in SQL can be mapped to a class in the Java programming language. SQL中定义的用户定义类型(UDT)可以映射到Java编程语言中的类。An SQL structured type or an SQL DISTINCT type are the UDTs that may be custom mapped. SQL结构化类型或SQL独特类型是可以自定义映射的UDT。The following three steps set up a custom mapping:以下三个步骤设置自定义映射:
  1. Defining the SQL structured type or DISTINCT type in SQL在SQL中定义SQL结构化类型或不同类型
  2. Defining the class in the Java programming language to which the SQL UDT will be mapped. 用Java编程语言定义SQL UDT将映射到的类。This class must implement the SQLData interface. 此类必须实现SQLData接口。
  3. Making an entry in a Connection object's type map that contains two things:Connection对象的类型映射中创建包含两项内容的条目:
    • the fully-qualified SQL name of the UDTUDT的完全限定SQL名称
    • the Class object for the class that implements the SQLData interface实现SQLData接口的类的Class对象

When these are in place for a UDT, calling the methods ResultSet.getObject or CallableStatement.getObject on that UDT will automatically retrieve the custom mapping for it. 当UDT有了这些方法后,调用该UDT上的ResultSet.getObjectCallableStatement.getObject方法将自动检索该UDT的自定义映射。Also, the PreparedStatement.setObject method will automatically map the object back to its SQL type to store it in the data source.此外,PreparedStatement.setObject方法将自动将对象映射回其SQL类型,以将其存储在数据源中。

Package Specification包规范文档

Related Documentation相关文档

  • Interface Summary接口摘要
    Interface接口
    Description描述
    The mapping in the Java programming language for the SQL type ARRAY.Java编程语言中SQL类型ARRAY的映射。
    The representation (mapping) in the Java programming language of an SQL BLOB value.SQL BLOB值在Java编程语言中的表示(映射)。
    The interface used to execute SQL stored procedures.用于执行SQL存储过程的接口。
    The mapping in the Java programming language for the SQL CLOB type.SQL CLOB类型在Java编程语言中的映射。
    A connection (session) with a specific database.与特定数据库的连接(会话)。
    A builder created from a DataSource object, used to establish a connection to the database that the data source object represents.DataSource对象创建的生成器,用于建立到data source对象所表示的数据库的连接。
    Comprehensive information about the database as a whole.关于整个数据库的全面信息。
    The interface that every driver class must implement.每个驱动程序类必须实现的接口。
    An interface that must be implemented when a Driver wants to be notified by DriverManager.Driver希望由DriverManager通知时,必须实现的接口。
    The mapping in the Java programming language for the SQL NCLOB type.SQL NCLOB类型在Java编程语言中的映射。
    An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object.可用于获取PreparedStatement对象中每个参数标记的类型和属性信息的对象。
    An object that represents a precompiled SQL statement.表示预编译SQL语句的对象。
    The mapping in the Java programming language of an SQL REF value, which is a reference to an SQL structured type value in the database.Java编程语言中SQL REF值的映射,它是对数据库中SQL结构化类型值的引用。
    A table of data representing a database result set, which is usually generated by executing a statement that queries the database.表示数据库结果集的数据表,通常通过执行查询数据库的语句生成。
    An object that can be used to get information about the types and properties of the columns in a ResultSet object.一个对象,可用于获取有关ResultSet对象中列的类型和属性的信息。
    The representation (mapping) in the Java programming language of an SQL ROWID value.SQL ROWID值在Java编程语言中的表示(映射)。
    The representation of a savepoint, which is a point within the current transaction that can be referenced from the Connection.rollback method.保存点的表示形式,它是当前事务中可从Connection.rollback方法引用的点。
    Interface used to indicate that this object represents a Sharding Key.接口,用于指示此对象表示切分键。
    A builder created from a DataSource or XADataSource object, used to create a ShardingKey with sub-keys of supported data types.DataSourceXADataSource对象创建的生成器,用于创建具有支持的数据类型的子键的ShardingKey
    The interface used for the custom mapping of an SQL user-defined type (UDT) to a class in the Java programming language.用于将SQL用户定义类型(UDT)自定义映射到Java编程语言中的类的接口。
    An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type.一种输入流,包含表示SQL结构化类型或SQL独特类型实例的值流。
    The output stream for writing the attributes of a user-defined type back to the database.用于将用户定义类型的属性写回数据库的输出流。
    An object that is used to identify a generic SQL type, called a JDBC type or a vendor specific data type.用于标识通用SQL类型(称为JDBC类型或特定于供应商的数据类型)的对象。
    The mapping in the JavaTM programming language for the SQL XML type.JavaTM编程语言中SQL XML类型的映射。
    The object used for executing a static SQL statement and returning the results it produces.用于执行静态SQL语句并返回其生成的结果的对象。
    The standard mapping in the Java programming language for an SQL structured type.Java编程语言中SQL结构化类型的标准映射。
    Interface for JDBC classes which provide the ability to retrieve the delegate instance when the instance in question is in fact a proxy class.JDBC类的接口,该接口提供了当所讨论的实例实际上是代理类时检索委托实例的能力。
  • Class Summary类摘要
    Class
    Description描述
    A thin wrapper around a millisecond value that allows JDBC to identify this as an SQL DATE value.围绕毫秒值的精简包装器,允许JDBC将其标识为SQLDATE
    The basic service for managing a set of JDBC drivers.用于管理一组JDBC驱动程序的基本服务。
    Driver properties for making a connection.用于建立连接的驱动程序属性。
    The permission for which the SecurityManager will check when code that is running an application with a SecurityManager enabled, calls the DriverManager.deregisterDriver method, DriverManager.setLogWriter method, DriverManager.setLogStream (deprecated) method, SyncFactory.setJNDIContext method, SyncFactory.setLogger method, Connection.setNetworkTimeout method, or the Connection.abort method.当运行启用了SecurityManager的应用程序的代码调用DriverManager.deregisterDriver方法、DriverManager.setLogWriter方法、DriverManager.setLogStream(已弃用)方法、SyncFactory.setJNDIContext方法、SyncFactory.setLogger方法、Connection.setNetworkTimeout方法或Connection.abort方法时,SecurityManager将检查的权限。
    A thin wrapper around the java.util.Date class that allows the JDBC API to identify this as an SQL TIME value.围绕java.util.Date类的精简包装器,允许JDBC API将其标识为SQLTIME值。
    A thin wrapper around java.util.Date that allows the JDBC API to identify this as an SQL TIMESTAMP value.围绕java.util.Date的精简包装器,允许JDBC API将其标识为SQLTIMESTAMP值。
    The class that defines the constants that are used to identify generic SQL types, called JDBC types.定义用于标识通用SQL类型的常量的类,称为JDBC类型。
  • Enum Class Summary枚举类摘要
    Enum Class枚举类
    Description描述
    Enumeration for status of the reason that a property could not be set via a call to Connection.setClientInfo枚举无法通过调用Connection.setClientInfo设置属性的原因的状态
    Defines the constants that are used to identify generic SQL types, called JDBC types.定义用于标识通用SQL类型(称为JDBC类型)的常量。
    Enumeration for pseudo/hidden column usage.伪/隐藏列用法的枚举。
    Enumeration for RowId life-time values.RowId生存期值的枚举。
  • Exception Summary异常摘要
    Exception异常
    Description描述
    The subclass of SQLException thrown when an error occurs during a batch update operation.在批处理更新操作期间发生错误时引发的SQLException子类。
    An exception thrown as a DataTruncation exception (on writes) or reported as a DataTruncation warning (on reads) when a data values is unexpectedly truncated for reasons other than its having exceeded MaxFieldSize.当数据值由于超出MaxFieldSize以外的原因被意外截断时,作为DataTruncation异常(在写入时)抛出或作为DataTruncation警告(在读取时)报告的异常。
    The subclass of SQLException is thrown when one or more client info properties could not be set on a Connection.当无法在连接上设置一个或多个客户端信息属性时,将引发SQLException的子类。
    The subclass of SQLException thrown when the SQLState class value is '22', or under vendor-specified conditions.SQLState类值为“22”或在供应商指定的条件下引发的SQLException的子类。
    An exception that provides information on a database access error or other errors.提供有关数据库访问错误或其他错误的信息的异常。
    The subclass of SQLException thrown when the SQLState class value is '0A' ( the value is 'zero' A).SQLState类值为“0A”(值为“零”A)时引发的SQLException子类。
    The subclass of SQLException thrown when the SQLState class value is '23', or under vendor-specified conditions.SQLState类值为“23”或在供应商指定的条件下引发的SQLException的子类。
    The subclass of SQLException thrown when the SQLState class value is '28', or under vendor-specified conditions.SQLState类值为“28”或在供应商指定的条件下引发的SQLException的子类。
    The subclass of SQLException thrown for the SQLState class value '08', or under vendor-specified conditions.SQLState类值“08”或在供应商指定的条件下引发的SQLException的子类。
    The subclass of SQLException thrown when an instance where a retry of the same operation would fail unless the cause of the SQLException is corrected.当实例重试同一操作失败时抛出的SQLException子类,除非纠正SQLException的原因。
    The subclass of SQLException thrown in situations where a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch.如果应用程序执行一些恢复步骤并重试整个事务,或者在分布式事务的情况下,事务分支,则在以前失败的操作可能成功的情况下抛出的SQLException子类。
    The subclass of SQLException thrown when the SQLState class value is '42', or under vendor-specified conditions.SQLState类值为“42”或在供应商指定的条件下引发的SQLException子类。
    The subclass of SQLException thrown when the timeout specified by Statement.setQueryTimeout, DriverManager.setLoginTimeout, DataSource.setLoginTimeout,XADataSource.setLoginTimeout has expired.Statement.setQueryTimeoutDriverManager.setLoginTimeoutDataSource.setLoginTimeoutXADataSource.setLoginTimeout指定的超时已过期时引发的SQLException子类。
    The subclass of SQLException thrown when the SQLState class value is '40', or under vendor-specified conditions.当SQLState类值为“40”或在供应商指定的条件下引发的SQLException的子类。
    The subclass of SQLException for the SQLState class value '08', or under vendor-specified conditions.SQLState类值“08”的SQLException子类,或在供应商指定的条件下。
    The subclass of SQLException is thrown in situations where a previously failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality.SQLException的子类在没有应用程序级功能的任何干预而重试之前失败的操作时可能能够成功的情况下抛出。
    An exception that provides information on database access warnings.提供有关数据库访问警告信息的异常。