LOWER (Azure Cosmos DB)

APPLIES TO: SQL API

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

The LOWER system function does not utilize the index. If you plan to do frequent case insensitive comparisons, the LOWER system function may consume a significant amount of RU's. If this is the case, instead of using the LOWER system function to normalize data each time for comparisons, you can normalize the casing upon insertion. Then a query such as SELECT * FROM c WHERE LOWER(c.name) = 'bob' simply becomes SELECT * FROM c WHERE c.name = 'bob'.

Syntax

LOWER(<str_expr>)  

Arguments

str_expr
Is a string expression.

Return types

Returns a string expression.

Examples

The following example shows how to use LOWER in a query.

SELECT LOWER("Abc") AS lower

Here is the result set.

[{"lower": "abc"}]  
  

Remarks

This system function will not use indexes.

Next steps