IS_NULL (NoSQL query)
APPLIES TO:
NoSQL
Returns a boolean value indicating if the type of the specified expression is null
.
Syntax
IS_NULL(<expr>)
Arguments
Description | |
---|---|
expr |
Any expression. |
Return types
Returns a boolean expression.
Examples
The following example checks objects of various types using the function.
SELECT VALUE {
booleanIsNull: IS_NULL(true),
numberIsNull: IS_NULL(15),
stringIsNull: IS_NULL("AdventureWorks"),
nullIsNull: IS_NULL(null),
objectIsNull: IS_NULL({price: 85.23}),
arrayIsNull: IS_NULL(["red", "blue", "yellow"]),
populatedObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.quantity),
invalidObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.size),
nullObjectPropertyIsNull: IS_NULL({quantity: 25, vendor: null}.vendor)
}
[
{
"booleanIsNull": false,
"numberIsNull": false,
"stringIsNull": false,
"nullIsNull": true,
"objectIsNull": false,
"arrayIsNull": false,
"populatedObjectPropertyIsNull": false,
"invalidObjectPropertyIsNull": false,
"nullObjectPropertyIsNull": true
}
]
Remarks
- This function benefits from a range index.
Related content
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho