แก้ไข

แชร์ผ่าน


LOWER (NoSQL query)

APPLIES TO: NoSQL

Returns a string expression after converting uppercase character data to lowercase.

Note

This function automatically uses culture-independent (invariant) casing rules when returning the converted string expression.

Syntax

LOWER(<string_expr>)  

Arguments

Description
string_expr A string expression.

Return types

Returns a string expression.

Examples

The following example shows how to use the function to modify various strings.

SELECT VALUE {
    lowercase: LOWER("adventureworks"),
    uppercase: LOWER("ADVENTUREWORKS"),
    camelCase: LOWER("adventureWorks"),
    pascalCase: LOWER("AdventureWorks"),
    upperSnakeCase: LOWER("ADVENTURE_WORKS")
}
[
  {
    "lowercase": "adventureworks",
    "uppercase": "adventureworks",
    "camelCase": "adventureworks",
    "pascalCase": "adventureworks",
    "upperSnakeCase": "adventure_works"
  }
]

Remarks

  • This function doesn't use the index.
  • If you plan to do frequent case insensitive comparisons, this function may consume a significant number of RUs. Consider normalizing the casing of strings when ingesting your data. Then a query like SELECT * FROM c WHERE LOWER(c.name) = 'USERNAME' is simplified to SELECT * FROM c WHERE c.name = 'USERNAME'.