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 15.3 and above
Tests whether variantExpr is a VARIANT-encoded NULL.
Syntax
is_variant_null ( variantExpr )
Arguments
variantExpr: AVARIANTexpression to check if it isVARIANT-encodedNULL.
Returns
A BOOLEAN.
Notes
This function checks whether the variantExpr is storing a VARIANT encoded NULL.
Use the IS NULL operator to check if the input variantExpr is NULL.
Examples
-- Simple example
> SELECT is_variant_null(v:key), is_variant_null(v:a)
FROM VALUES(parse_json('{"key": null, "a": 1}')) AS T(v)
true false
-- difference between is_variant_null and is null
> SELECT is_variant_null(v:key), v:key IS NULL
FROM VALUES(parse_json('{"key": null}')) AS T(v)
true false