Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.37 KB

File metadata and controls

54 lines (37 loc) · 1.37 KB
title titleSuffix description author ms.author ms.reviewer ms.service ms.subservice ms.topic ms.devlang ms.date ms.custom
RTRIM
Azure Cosmos DB for NoSQL
An Azure Cosmos DB for NoSQL system function that returns a string expression with trailing whitespace or specified characters removed.
jcodella
jacodel
sidandrews
cosmos-db
nosql
reference
nosql
02/27/2024
query-reference

RTRIM (NoSQL query)

[!INCLUDENoSQL]

Returns a string expression after it removes trailing whitespace or specified characters.

Syntax

RTRIM(<string_expr_1> [, <string_expr_2>])  

Arguments

Description
string_expr_1 A string expression.
string_expr_2 (Optional) An optional string expression to be trimmed from string_expr_1. If not set, the default is to trim whitespace.

Return types

Returns a string expression.

Examples

The following example shows how to use this function with various parameters inside a query.

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

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

Remarks

  • This function doesn't use the index.

Related content