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通过DriverManagerfacilityDriverManager工具与数据库建立连接DriverManagerclass -- makes a connection with a driverDriverManager类--与驱动程序建立连接SQLPermissionclass -- provides permission when code running within a Security Manager, such as an applet, attempts to set up a logging stream through theDriverManagerSQLPermission类--在安全管理器(如小程序)中运行的代码试图通过DriverManager设置日志流时提供权限Driverinterface -- provides the API for registering and connecting drivers based on JDBC technology ("JDBC drivers"); generally used only by theDriverManagerclassDriver接口--提供基于JDBC技术注册和连接驱动程序的API(“JDBC驱动程序”);通常仅由DriverManager类使用DriverPropertyInfoclass -- 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派生)Connectioninterface -- 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检索和更新查询结果ResultSetinterface接口
Standard mappings for SQL types to classes and interfaces in the Java programming languageJava编程语言中SQL类型到类和接口的标准映射Arrayinterface -- mapping for SQL接口--SQLARRAYARRAY的映射Blobinterface -- mapping for SQL接口--SQLBLOBBLOB的映射Clobinterface -- mapping for SQL接口--SQLCLOBCLOB的映射Dateclass -- mapping for SQL类--SQLDATEDATE的映射NClobinterface -- mapping for SQL接口--SQLNCLOBNCLOB的映射Refinterface -- mapping for SQL接口--SQLREFREF的映射RowIdinterface -- mapping for SQL接口--SQLROWIDROWID的映射Structinterface -- mapping for SQL接口--SQLSTRUCTSTRUCT的映射SQLXMLinterface -- mapping for SQL接口--SQLXMLXML的映射Timeclass -- mapping for SQL类--SQLTIMETIME的映射Timestampclass -- mapping for SQL类--SQLTIMESTAMPTIMESTAMP的映射Typesclass -- 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编程语言中的类SQLDatainterface -- specifies the mapping of a UDT to an instance of this class接口--指定UDT到此类实例的映射SQLInputinterface -- provides methods for reading UDT attributes from a stream接口--提供从流中读取UDT属性的方法SQLOutputinterface -- provides methods for writing UDT attributes back to a stream接口--提供将UDT属性写回流的方法
Metadata元数据DatabaseMetaDatainterface -- provides information about the databaseDatabaseMetaData接口--提供有关数据库的信息ResultSetMetaDatainterface -- provides information about the columns of aResultSetobjectResultSetMetaData接口--提供有关ResultSet对象的列的信息ParameterMetaDatainterface -- provides information about the parameters toPreparedStatementcommandsParameterMetaData接口--提供有关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增加了ShardingsupportSharding支持Enhanced增强的Connectionto be able to provide hints to the driver that a request, an independent unit of work, is beginning or endingConnection,能够向驱动程序提示请求(一个独立的工作单元)正在开始或结束Enhanced增强的DatabaseMetaDatato determine if Sharding is supportedDatabaseMetaData,用于确定是否支持分片Added the method将driverstoDriverManagerto return a Stream of the currently loaded and available JDBC driversdrivers方法添加到DriverManager,以返回当前加载的可用JDBC驱动程序流Added support to添加了对Statementfor 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添加了JDBCTypeenum andSQLTypeinterfaceJDBCType枚举和SQLType接口Support forREF CURSORSinCallableStatementCallableStatement中对REF CURSORS的支持返回最大逻辑LOB大小和是否支持Ref游标的DatabaseMetaDatamethods 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,ResultSetandStatementobjects to be used with the try-with-resources statementConnection、ResultSet和Statement对象与try-with-resources语句一起使用Support added to添加到CallableStatementandResultSetto specify the Java type to convert to via thegetObjectmethodCallableStatement和ResultSet的支持,以通过getObject方法指定要转换为的Java类型DatabaseMetaDatamethods to return PseudoColumns and if a generated key is always returnedDatabaseMetaData方法返回伪列,以及是否始终返回生成的键Added support to添加了对Connectionto specify a database schema, abort and timeout a physical connection.Connection的支持,以指定数据库架构、中止和超时物理连接。Added support to close a添加了在关闭依赖对象时关闭Statementobject when its dependent objects have been closedStatement对象的支持Support for obtaining the parent logger for a支持获取Driver,DataSource,ConnectionPoolDataSourceandXADataSourceDriver、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.Driverclass viaClass.forNameclass.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与PreparedStatementthat is associated with aPooledConnectionhas 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 aPreparedStatementobjectPreparedStatement对象参数的元数据Ability to retrieve values from automatically generated columns能够从自动生成的列中检索值Ability to have multiple能够同时打开从ResultSetobjects returned fromCallableStatementobjects open at the same timeCallableStatement对象返回的多个ResultSet对象Ability to identify parameters to能够通过名称和索引识别CallableStatementobjects by name as well as by indexCallableStatement对象的参数ResultSetholdability -- ability to specify whether cursors should be held open or closed at the end of a transactionResultSetholdability--指定游标在事务结束时应保持打开还是关闭的功能Ability to retrieve and update the SQL structured type instance that a能够检索和更新Refobject referencesRef对象引用的SQL结构化类型实例Ability to programmatically update能够以编程方式更新BLOB,CLOB,ARRAY, andREFvalues.BLOB、CLOB、ARRAY和REF值。Addition of the添加java.sql.Types.DATALINKdata 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可滚动结果集--在ResultSetinterface 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编程更新--使用ResultSetupdater 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.BigDecimalvalues, 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 APITheDataSourceinterface as a means of making a connection.DataSource接口作为建立连接的手段。The Java Naming and Directory Interface (JNDI) is used for registering aJava命名和目录接口(JNDI)用于向命名服务注册DataSourceobject 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服务器RowSettechnology -- 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结构化类型或不同类型DISTINCTtype 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此类必须实现SQLDatainterface.SQLData接口。Making an entry in a在Connectionobject's type map that contains two things:Connection对象的类型映射中创建包含两项内容的条目:the fully-qualified SQL name of the UDTUDT的完全限定SQL名称the实现Classobject for the class that implements theSQLDatainterfaceSQLData接口的类的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 SQLSQLBLOBvalue.BLOB值在Java编程语言中的表示(映射)。The interface used to execute SQL stored procedures.用于执行SQL存储过程的接口。The mapping in the Java programming language for the SQLSQLCLOBtype.CLOB类型在Java编程语言中的映射。A connection (session) with a specific database.与特定数据库的连接(会话)。A builder created from a从DataSourceobject, used to establish a connection to the database that thedata sourceobject 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 SQLSQLNCLOBtype.NCLOB类型在Java编程语言中的映射。An object that can be used to get information about the types and properties for each parameter marker in a可用于获取PreparedStatementobject.PreparedStatement对象中每个参数标记的类型和属性信息的对象。An object that represents a precompiled SQL statement.表示预编译SQL语句的对象。The mapping in the Java programming language of an SQLJava编程语言中SQLREFvalue, 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一个对象,可用于获取有关ResultSetobject.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.rollbackmethod.Connection.rollback方法引用的点。Interface used to indicate that this object represents a Sharding Key.接口,用于指示此对象表示切分键。A builder created from a从DataSourceorXADataSourceobject, 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将其标识为SQLDATEvalue.DATE值The basic service for managing a set of JDBC drivers.用于管理一组JDBC驱动程序的基本服务。Driver properties for making a connection.用于建立连接的驱动程序属性。The permission for which the当运行启用了SecurityManagerwill check when code that is running an application with aSecurityManagerenabled, calls theDriverManager.deregisterDrivermethod,DriverManager.setLogWritermethod,DriverManager.setLogStream(deprecated) method,SyncFactory.setJNDIContextmethod,SyncFactory.setLoggermethod,Connection.setNetworkTimeoutmethod, or theConnection.abortmethod.SecurityManager的应用程序的代码调用DriverManager.deregisterDriver方法、DriverManager.setLogWriter方法、DriverManager.setLogStream(已弃用)方法、SyncFactory.setJNDIContext方法、SyncFactory.setLogger方法、Connection.setNetworkTimeout方法或Connection.abort方法时,SecurityManager将检查的权限。A thin wrapper around the围绕java.util.Dateclass that allows the JDBC API to identify this as an SQLTIMEvalue.java.util.Date类的精简包装器,允许JDBC API将其标识为SQLTIME值。A thin wrapper around围绕java.util.Datethat allows the JDBC API to identify this as an SQLTIMESTAMPvalue.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.setClientInfoConnection.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当数据值由于超出DataTruncationexception (on writes) or reported as aDataTruncationwarning (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子类,除非纠正SQLExceptionis 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.setLoginTimeouthas 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.提供有关数据库访问警告信息的异常。