Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
APPLIES TO:
NoSQL
Returns the number of characters in the specified string expression.
LENGTH(<string_expr>)
Description | |
---|---|
string_expr |
A string expression. |
Returns a numeric expression.
The following example returns the length of a static string.
SELECT VALUE {
stringValue: LENGTH("AdventureWorks"),
emptyString: LENGTH(""),
nullValue: LENGTH(null),
numberValue: LENGTH(0),
arrayValue: LENGTH(["Adventure", "Works"])
}
[
{
"stringValue": 14,
"emptyString": 0
}
]
- This system function doesn't use the index.