Is there any analogue of NVL in the Presto database?
I need to check if the field is NULL and return the default value.
I solve it somehow like this:
SELECT
CASE
WHEN my_field is null THEN 0
ELSE my_field
END
FROM my_table
But I'm curious if there is anything that could simplify this code.
source
share