JDBC provides support for almost all SQL data types. Whenever the JDBC driver receives a call from a Java application, it converts the Java data types in it to the corresponding SQL type of data. The conversion process follows the default mapping. The following is a list of data types supported by JDBC and their corresponding SQL data types.
SQL | JDBC/Java |
---|---|
java.lang.String | |
java.lang.String | |
java. lang.String | |
Boolean | |
java.math.BigDecimal | |
bytes | |
Short | |
int | ##BIGINT |
REAL | |
FLOAT | |
Double precision | |
VARBINARY | |
Binary | |
Date | |
TIME | |
TIMESTAMP | |
CLOB | |
BLOB | |
ARRAY | |
REF | |
STRUCT | |
The above is the detailed content of What data types does JDBC support?. For more information, please follow other related articles on the PHP Chinese website!