As we have seen in the previous chapters, the SELECT
statement is the key to using DocumentDB and selecting, finding, and filtering resources inside your collections.
The SELECT
statement is described in the following syntax convention:
<select_query> ::= SELECT <select_specification> [ FROM <from_specification>] [ WHERE <filter_condition> ] [ ORDER BY <order_by_specification>]
As you can see, a SELECT
statement consists of the SELECT
keyword as well as (optionally) the FROM
and WHERE
clauses.
It is possible to execute only the SELECT
statement, as we will see later in this chapter. The following code snippet shows a simple example of only a SELECT
statement:
SELECT ABS(-1) returns [ { "$1": 1 } ]