Google Cloud SQL

JDBC Data Type Mappings

This document describes the data type mappings of Google Cloud SQL to JDBC data types and Java classes. The ResultSet.getObject() method uses the following mappings to convert between Google Cloud SQL data types and Java types.

Database Type JDBC Data Type Java Class
BIGINT BIGINT BigInteger
BIT BIT Boolean
BOOLEAN BOOLEAN Boolean
DECIMAL DECIMAL BigDecimal
DOUBLE, DOUBLE PRECISION DOUBLE Double
FLOAT FLOAT Double
INT, INTEGER INTEGER Integer
MEDIUMINT INTEGER Integer
NUMERIC NUMERIC BigDecimal
REAL DOUBLE Double
SMALLINT SMALLINT Integer
TINYINT TINYINT Integer
DATE DATE Date
DATETIME TIMESTAMP Timestamp
TIME TIME Time
TIMESTAMP TIMESTAMP Timestamp
YEAR SMALLINT Integer
BINARY BINARY byte[]
BLOB VARBINARY byte[]
CHAR CHAR String
ENUM CHAR String
LONGBLOB BLOB java.sql.Blob
LONGTEXT CLOB java.sql.Clob
MEDIUMBLOB BLOB java.sql.Blob
MEDIUMTEXT CLOB java.sql.Clob
SET CHAR String
TEXT VARCHAR String
TINYBLOB VARBINARY byte[]
TINYTEXT VARCHAR String
VARBINARY VARBINARY byte[]
VARCHAR VARCHAR String

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.