Was this helpful?
CAST Expressions
An alternative to using CASE and DECODE for conversions is the CAST expression. Cast expressions coerce the source expression into the indicated data type. They can appear anywhere that other forms of expression can.
They are specified as follows:
CAST (expr AS datatype)
where expr is the source value expression and datatype is any supported data type.
Example:
SELECT CAST(CURRENT_TIME AS TIME(9) WITH TIME ZONE);
Last modified date: 06/28/2024