CAST()
Converts a value from one data type to another
As specified by target_type
CAST (<expression> AS <target_type>) <target_type> ::= <domain_or_non_array_type> | <array_datatype> <domain_or_non_array_type> ::= !! See Scalar Data Types Syntax !! <array_datatype> ::= !! See Array Data Types Syntax !!
Parameter | Description |
---|---|
expression |
SQL expression |
sql_datatype |
SQL data type |
CAST
converts an expression to the desired data type or domain.If the conversion is not possible, an error is raised.