I have a use case , where I have a choice to apply NVL or COALESCE . ex: COALESCE(col_1,'alternate_string')

NVL(col_1,'alternate_string')

I know about IS NULL and IS NOT NUll , but tell me how will I adapt it to this query : DELETE FROM TABLE_1 T1 USING TABLE_2 T2 WHERE T1.col_1 = T2.col1 t1.col2 = t2.col2 and so on . ..... Should I be using Cases for that ? How will handle for boolean types. I want to know which one runs faster in terms of execution time in AWS Redshift ?

6

They are the same:

COALESCE

Synonym of the NVL expression.

NVL

An NVL expression is identical to a COALESCE expression

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.