Nata
Norint pasiekti šį puslapį, reikalingas leidimas. Galite pabandyti prisijungti arba pakeisti katalogus.
Norint pasiekti šį puslapį, reikalingas leidimas. Galite pabandyti pakeisti katalogus.
The LENGTH function returns the number of characters in the specified string expression.
An Azure Cosmos DB system function that returns the numeric length of a string expression.
Syntax
LENGTH(<string_expr>)
Arguments
| Description | |
|---|---|
string_expr |
A string expression. |
Return types
Returns a numeric expression.
Examples
This section contains examples of how to use this query language construct.
Get length of string
In this example, the LENGTH function is used to return the length of a static string.
SELECT VALUE {
stringValue: LENGTH("AdventureWorks"),
emptyString: LENGTH("")
}
[
{
"stringValue": 14,
"emptyString": 0
}
]
Remarks
- This function doesn't utilize the index.