Was this helpful?
CAST Expression
An alternative to using CASE and DECODE for conversions is the CAST expression. A CAST expression coerces the source expression into the indicated data type. It can be used anywhere that other expressions can. CAST has the following format:
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: 08/29/2024