Share via


Keywords - Query language in Cosmos DB (in Azure and Fabric)

The query language in Cosmos DB (in Azure and Fabric) includes reserved keywords that provide extended functionality for building queries. These keywords enable operations like filtering with BETWEEN and LIKE, eliminating duplicates with DISTINCT, and limiting results with TOP.

Keywords

Here's a list of keywords that the query language currently supports:

Description
BETWEEN The BETWEEN keyword evaluates to a boolean indicating whether the target value is between two specified values, inclusive.
DISTINCT The DISTINCT keyword eliminates duplicates in the projected query results.
LIKE The LIKE keyword a boolean value depending on whether a specific character string matches a specified pattern.
IN The IN keyword checks whether a specified value matches any value in a list.
TOP The TOP keyword returns the first N number of query results in an undefined order.