java.sql.SQLType interface JDBC 4.2 introduced a data type identifier, java.sql.SQLType, to help databases describe data types which do not appear in the ANSI/ISO SQL Standard. Databases which provide non-standard types can provide their own implementations of SQLType. JDBC 4.2SQLType interface

JDBC 4.2 also supplies its own implementation, java.sql.JDBCType, which provides an enum for each of the type identifiers in java.sql.Types.

does not expose any datatypes which are not represented by JDBCType enums. Therefore, does not need to provide its own implementation of SQLType.

Overloads with SQLType arguments have been added to a few interfaces, alongside the existing methods which take int type identifiers from java.sql.Types. The affected interfaces are as follows:

  • java.sql.CallableStatement
  • java.sql.PreparedStatement
  • java.sql.ResultSet

With , these methods raise a java.sql.SQLFeatureNotSupportedException (SQLState 0A000) if the caller passes in a bad SQLType, which can be either of the following:

  • A SQLType from a foreign database; that is, a SQLType which is not one of the JDBCType enums.
  • A JDBCType enum whose corresponding int type identifier (from java.sql.Types) is not supported by . The supported int type identifiers are documented in and in the section. The JDBCType enums have the same names as their corresponding int identifiers in java.sql.Types.