TiDB supports all the data types in MySQL except the
SPATIAL type. This includes all the numeric types, string types, date & time types, and the JSON type.
The definitions used for datatypes are specified as
T(M[, D]). Where by:
Tindicates the specific data type.
Mindicates the maximum display width for integer types. For floating-point and fixed-point types,
Mis the total number of digits that can be stored (the precision). For string types,
Mis the maximum length. The maximum permissible value of M depends on the data type.
Dapplies to floating-point and fixed-point types and indicates the number of digits following the decimal point (the scale).
fspapplies to the
TIMESTAMPtypes and represents the fractional seconds precision. The
fspvalue, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0.
Was this page helpful?