Data Type Conversion

Data Type Conversion

MatrixOne supports the conversion between different data types, the supported and unsupported conversions are listed in the following table.

  • Castable: explicit conversion with cast function.
  • Coercible: implicit conversion without cast function.
Source Data TypeTarget Data TypeCastableCoercible
BOOLEANINTEGER
DECIMAL
VARCHAR
DATETIMESTAMP
DATETIME
VARCHAR
DATETIMETIMESTAMP
DATE
VARCHAR
FLOAT(Floating-point number)INTEGER
DECIMAL
VARCHAR
INTEGERBOOLEAN
FLOAT
TIMESTAMP
VARCHAR
DECIMAL
TIMESTAMPDATE
DATETIME
VARCHAR
VARCHARBOOLEAN
DATE
FLOAT
INTEGER
DECIMAL
TIMESTAMP
DATETIME