MySQL data types
Whenever dealing with data types, e.g. in a result set, or the execution of a prepared statement, the following types are used:
decimal : a decimal number, represented as a BigDecimal object
compatible types: number, BigDecimal, string containing a valid number
tiny: a byte, which or may not be signed
compatible types: number, boolean
short: a two-byte integer, which or may not be signed
compatible types: number
long: a four-byte integer
compatible types: number
float: a four-byte floating-point number
compatible types: number
double: an eight-byte floating-point number
compatible types: number
timestamp: represented as a MySQLDateTime object, but can also be manipulated as a string of the form YYYY-MM-DD HH:MM:SS.ssssss
compatible types: MySQLDateTime, string
long long: an eight-byte integer
compatible types: number
int24: a three-byte integer
compatible types: number
date: represented as a MySQLDateTime object, but can also be manipulated as a string of the form YYYY-MM-DD
compatible types: MySQLDateTime, string
time: represented as a MySQLTime object, but can also be manipulated as a string of the form HH:MM:SS.ssssss
compatible types: MySQLTime, string
datetime: represented as a MySQLDateTime object, but can also be manipulated as a string of the form YYYY-MM-DD HH:MM:SS.ssssss
compatible types: MySQLDateTime, string
year: a two-byte integer between 1000 and 9999
compatible types: number
new date: same as date
varchar: a string of characters
bit: between 1 and 64 bits, represented as an integer
timestamp2: same as timestamp
datetime2: sabe datetime
time2: same as date
json: a string of characters, normally using the JSON notation
new decimal: same as decimal
enum: a string, whose value is normally constrained by the definition of the column/type
set: zero or more comma-separated strings, normally from the set allowed in the definition of the column/type
tiny blob: a byte array of up to 255 bytes
medium blob: a byte array of up to 16M bytes
long blob: a byte array of up to 4G bytes
blob: a byte array of up t0 16K bytes
var string: a byte array
string: a string of characters
geometry: can be represented either as a byte array or a string, depending on the client