# java.sql.SQLType interface

JDBC 4.2 introduces a new 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.2 also supplies its own implementation, java.sql.JDBCType, which provides an enum for each of the type identifiers in java.sql.Types.

Derby does not expose any datatypes which are not represented by JDBCType enums. Therefore, Derby 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 Derby, 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 Derby. The supported int type identifiers are documented in Mapping of java.sql.Types to SQL types and in the Data types section. The JDBCType enums have the same names as their corresponding int identifiers in java.sql.Types.

Parent topic: JDBC 4.2-only features
Related reference
JDBC support for Java SE 8 Compact Profiles
java.sql.DatabaseMetaData interface: JDBC 4.2 features