A. Using general operators

The query illustrates the use of general operators that apply to sequences, and also to compare sequences. The query retrieves a sequence of telephone numbers for each customer from the AdditionalContactInfo column of the Person table. This sequence is then compared with the sequence of two telephone numbers ("111-111-1111", "222-2222").

The query uses the = comparison operator. Each node in the sequence on the right side of the = operator is compared with each node in the sequence on the left side. If the nodes match, the node comparison is TRUE. It is then converted to an int and compared with 1, and the query returns the customer ID.

There is another way to observe how the previous query works: Each phone telephone number value retrieved from the AdditionalContactInfo column is compared with the set of two telephone numbers. If the value is in the set, that customer is returned in the result.

B. Using a numeric operator

The + operator in this query is a value operator, because it applies to a single item. For example, value 1 is added to a lot size that is returned by the query: