Database Reference
In-Depth Information
also be converted to
DOUBLE
or
DECIMAL
.
BOOLEAN
types cannot be converted to any
other type, and they cannot be implicitly converted to any other type in expressions.
TIMESTAMP
and
DATE
can be implicitly converted to a text type.
You can perform explicit type conversion using
CAST
. For example,
CAST('1' AS
INT)
will convert the string
'1'
to the integer value 1. If the cast fails — as it does in
CAST('X' AS INT)
, for example — the expression returns
NULL
.