Conversion Functions
When necessary, values can be explicitly cast to a particular type.
(value AS type) → type
Explicitly cast a value as a type. This can be used to cast a varchar to a numeric value type and vice versa.
try_cast
(value AS type) → type
Like cast(), but returns null if the cast fails.
The parse_presto_data_size
function supports the following units:
parse_presto_data_size
(string)
Parses string
of format into a number, where value
is the fractional number of unit
values:
Returns the name of the type of the provided expression:
SELECT typeof('cat'); -- varchar(3)