Coalesce function in built-in functions

By Bruno Gonçalves on 26 Jan

Variable ?? DefaultValue


if the variable is empty / null the DefaultValue is assigned

I'm not sure I understand. A variable, by default, has the default value. Which is the default value for the variable's type if no explicit default is specified.

A default value would be assigned once when the variable is created.  It can still be set to null later on.  The coalesce function would at run-time instant decide whether to use a default value or not.

I still don't understand: when the variable is "created", i.e. when it is defined, it already gets the default value.