Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.6 KB

File metadata and controls

57 lines (39 loc) · 1.6 KB
title titleSuffix description author ms.author ms.reviewer ms.service ms.subservice ms.topic ms.devlang ms.date ms.custom
LOWER
Azure Cosmos DB for NoSQL
An Azure Cosmos DB for NoSQL system function that returns a string expression with uppercase characters converted to lowercase.
jcodella
jacodel
sidandrews
cosmos-db
nosql
reference
nosql
02/27/2024
query-reference

LOWER (NoSQL query)

[!INCLUDENoSQL]

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.

:::code language="nosql" source="~/cosmos-db-nosql-query-samples/scripts/lower/query.sql" highlight="2-6":::

:::code language="json" source="~/cosmos-db-nosql-query-samples/scripts/lower/result.json":::

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'.

Related content