Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Returns expr2 if expr1 is NULL, or expr1 otherwise. This function is a synonym for coalesce(expr1, expr2) with two arguments.
Syntax
nvl(expr1, expr2)
Arguments
expr1: An expression of any type.expr2: An expression that shares a least common type withexpr1.
Returns
The result type is the least common type of the argument types.
Special considerations apply to VARIANT types. See isnull function for details.
Examples
> SELECT nvl(NULL, 2);
2
> SELECT nvl(3, 2);
3