REPLICATE (NoSQL query)
APPLIES TO:
NoSQL
Repeats a string value a specified number of times.
Syntax
REPLICATE(<string_expr>, <numeric_expr>)
Arguments
Description | |
---|---|
string_expr |
A string expression. |
numeric_expr |
A numeric expression. |
Return types
Returns a string expression.
Examples
The following example shows how to use this function to build a repeating string.
SELECT VALUE {
catchPhrase: REPLICATE("Cosmic", 3)
}
[
{
"catchPhrase": "CosmicCosmicCosmic"
}
]
Remarks
- This function doesn't use the index.
- The maximum length of the result is 10,000 characters.
(length(string_expr) * numeric_expr) <= 10,000
- If
numeric_expr
is negative or nonfinite, the result isundefined
.
Related content
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για