Package java.sql
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包括什么
java.sql
package, referred to as the JDBC core API, and the javax.sql
package, referred to as the JDBC Optional Package API.java.sql
包(称为JDBC核心API)和javax.sql
包(称为JDBC可选包API)。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.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关联的日志流,该日志流可能包含表名、列数据等信息。DriverManager
, which may contain information such as table names, column data, and so on.
What the java.sql
Package Containsjava.sql
包包含的内容
java.sql
Package Containsjava.sql
package contains API for the following:java.sql
包包含以下API:
Making a connection with a database via the通过DriverManager
facilityDriverManager
工具与数据库建立连接DriverManager
class -- makes a connection with a driverDriverManager
类--与驱动程序建立连接SQLPermission
class -- provides permission when code running within a Security Manager, such as an applet, attempts to set up a logging stream through theDriverManager
SQLPermission
类--在安全管理器(如小程序)中运行的代码试图通过DriverManager
设置日志流时提供权限Driver
interface -- provides the API for registering and connecting drivers based on JDBC technology ("JDBC drivers"); generally used only by theDriverManager
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--用于发送准备好的语句或基本SQL语句(从Statement
)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接口--SQLARRAY
ARRAY
的映射Blob
interface -- mapping for SQL接口--SQLBLOB
BLOB
的映射Clob
interface -- mapping for SQL接口--SQLCLOB
CLOB
的映射Date
class -- mapping for SQL类--SQLDATE
DATE
的映射NClob
interface -- mapping for SQL接口--SQLNCLOB
NCLOB
的映射Ref
interface -- mapping for SQL接口--SQLREF
REF
的映射RowId
interface -- mapping for SQL接口--SQLROWID
ROWID
的映射Struct
interface -- mapping for SQL接口--SQLSTRUCT
STRUCT
的映射SQLXML
interface -- mapping for SQL接口--SQLXML
XML
的映射Time
class -- mapping for SQL类--SQLTIME
TIME
的映射Timestamp
class -- mapping for SQL类--SQLTIMESTAMP
TIMESTAMP
的映射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 aResultSet
objectResultSetMetaData
接口--提供有关ResultSet
对象的列的信息ParameterMetaData
interface -- provides information about the parameters toPreparedStatement
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.sql
和javax.sql
特性
java.sql
and javax.sql
Features Introduced in the JDBC 4.3 APIAdded增加了Sharding
supportSharding
支持Enhanced增强的Connection
to be able to provide hints to the driver that a request, an independent unit of work, is beginning or endingConnection
,能够向驱动程序提示请求(一个独立的工作单元)正在开始或结束Enhanced增强的DatabaseMetaData
to determine if Sharding is supportedDatabaseMetaData
,用于确定是否支持分片Added the method将drivers
toDriverManager
to return a Stream of the currently loaded and available JDBC driversdrivers
方法添加到DriverManager
,以返回当前加载的可用JDBC驱动程序流Added support to添加了对Statement
for enquoting literals and simple identifiersStatement
的支持,以支持加引号的文本和简单标识符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.sql
和javax.sql
特性
java.sql
and javax.sql
Features Introduced in the JDBC 4.2 APIAdded添加了JDBCType
enum andSQLType
interfaceJDBCType
枚举和SQLType
接口Support forREF CURSORS
inCallableStatement
CallableStatement
中对REF CURSORS
的支持返回最大逻辑LOB大小和是否支持Ref游标的DatabaseMetaData
methods to return maximum Logical LOB size and if Ref Cursors are supportedDatabaseMetaData
方法Added support for large update counts增加了对大型更新计数的支持
java.sql
and javax.sql
Features Introduced in the JDBC 4.1 APIJDBC 4.1 API中引入的java.sql
和javax.sql
特性
java.sql
and javax.sql
Features Introduced in the JDBC 4.1 APIAllow允许Connection
,ResultSet
andStatement
objects to be used with the try-with-resources statementConnection
、ResultSet
和Statement
对象与try-with-resources语句一起使用Support added to添加到CallableStatement
andResultSet
to specify the Java type to convert to via thegetObject
methodCallableStatement
和ResultSet
的支持,以通过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 closedStatement
对象的支持Support for obtaining the parent logger for a支持获取Driver
,DataSource
,ConnectionPoolDataSource
andXADataSource
Driver
、DataSource
、ConnectionPoolDataSource
和XADataSource
的父记录器
java.sql
and javax.sql
Features Introduced in the JDBC 4.0 APIJDBC 4.0 API中引入的java.sql
和javax.sql
特性
java.sql
and javax.sql
Features Introduced in the JDBC 4.0 APIauto java.sql.Driver discovery自动java.sql.Driver发现 --no longer need to load a不再需要通过java.sql.Driver
class viaClass.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类值代码添加了新的SQLExceptionsEnhanced 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 aPooledConnection
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.sql
和javax.sql
特性
java.sql
and javax.sql
Features Introduced in the JDBC 3.0 APIPooled 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 aPreparedStatement
objectPreparedStatement
对象参数的元数据Ability to retrieve values from automatically generated columns能够从自动生成的列中检索值Ability to have multiple能够同时打开从ResultSet
objects returned fromCallableStatement
objects open at the same timeCallableStatement
对象返回的多个ResultSet
对象Ability to identify parameters to能够通过名称和索引识别CallableStatement
objects by name as well as by indexCallableStatement
对象的参数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 referencesRef
对象引用的SQL结构化类型实例Ability to programmatically update能够以编程方式更新BLOB
,CLOB
,ARRAY
, andREF
values.BLOB
、CLOB
、ARRAY
和REF
值。Addition of the添加java.sql.Types.DATALINK
data type -- allows JDBC drivers access to objects stored outside a data sourcejava.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
特性
java.sql
Features Introduced in the JDBC 2.1 Core APIScrollable 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 positionResultSet
界面中使用新方法,允许将光标移动到特定行或相对于其当前位置的位置Batch updates批量更新Programmatic updates--using编程更新--使用ResultSet
updater methodsResultSet
更新程序方法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
特性
javax.sql
Features Introduced in the JDBC 2.0 Optional Package APITheDataSource
interface as a means of making a connection.DataSource
接口作为建立连接的手段。The Java Naming and Directory Interface (JNDI) is used for registering aJava命名和目录接口(JNDI)用于向命名服务注册DataSource
object with a naming service and also for retrieving it.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映射
DISTINCT
type are the UDTs that may be custom mapped. Defining the SQL structured type or在SQL中定义SQL结构化类型或不同类型DISTINCT
type in SQLDefining 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
接口。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 theSQLData
interfaceSQLData
接口的类的Class
对象
When these are in place for a UDT, calling the methods 当UDT有了这些方法后,调用该UDT上的ResultSet.getObject
or CallableStatement.getObject
on that UDT will automatically retrieve the custom mapping for it. ResultSet.getObject
或CallableStatement.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相关文档
- Lesson:JDBC Basics(The Javaxx Tutorials > JDBC Database Access)
- “
JDBC API Tutorial and Reference, Third EditionJDBCAPI教程和参考,第三版”
Interface Summary接口摘要Interface接口Description描述The mapping in the Java programming language for the SQL typeJava编程语言中SQL类型ARRAY
.ARRAY
的映射。The representation (mapping) in the Java programming language of an SQLSQLBLOB
value.BLOB
值在Java编程语言中的表示(映射)。The interface used to execute SQL stored procedures.用于执行SQL存储过程的接口。The mapping in the Java programming language for the SQLSQLCLOB
type.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 thedata source
object represents.DataSource
对象创建的生成器,用于建立到data source
对象所表示的数据库的连接。Comprehensive information about the database as a whole.关于整个数据库的全面信息。The interface that every driver class must implement.每个驱动程序类必须实现的接口。The mapping in the Java programming language for the SQLSQLNCLOB
type.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 SQLJava编程语言中SQLREF
value, which is a reference to an SQL structured type value in the database.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
orXADataSource
object, used to create a ShardingKey with sub-keys of supported data types.DataSource
或XADataSource
对象创建的生成器,用于创建具有支持的数据类型的子键的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围绕毫秒值的精简包装器,允许JDBC将其标识为SQLDATE
value.DATE
值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 aSecurityManager
enabled, calls theDriverManager.deregisterDriver
method,DriverManager.setLogWriter
method,DriverManager.setLogStream
(deprecated) method,SyncFactory.setJNDIContext
method,SyncFactory.setLogger
method,Connection.setNetworkTimeout
method, or theConnection.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 SQLTIME
value.java.util.Date
类的精简包装器,允许JDBC API将其标识为SQLTIME
值。A thin wrapper around围绕java.util.Date
that allows the JDBC API to identify this as an SQLTIMESTAMP
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 aDataTruncation
warning (on reads) when a data values is unexpectedly truncated for reasons other than its having exceededMaxFieldSize
.MaxFieldSize
以外的原因被意外截断时,作为DataTruncation
异常(在写入时)抛出或作为DataTruncation
警告(在读取时)报告的异常。The subclass of SQLException is thrown when one or more client info properties could not be set on a当无法在连接上设置一个或多个客户端信息属性时,将引发SQLException的子类。Connection
.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子类,除非纠正SQLException
is corrected.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 byStatement.setQueryTimeout
,DriverManager.setLoginTimeout
,DataSource.setLoginTimeout
,XADataSource.setLoginTimeout
has expired.Statement.setQueryTimeout
、DriverManager.setLoginTimeout
、DataSource.setLoginTimeout
、XADataSource.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.提供有关数据库访问警告信息的异常。