Compound Query Operators

The following table shows compound query operators. In this table, operators appear in uppercase. However, query strings are case-sensitive. The operators do not have to be in uppercase.

When you perform a compound query, you must use parentheses to control the order in which the search for matching records is performed.

This table describes and provides an example of each compound query operator.

Operator

Description

Example

AND, and

Placed between values, returns only records for which all the conditions are true.

*performance* AND *memory* finds all records that contain both performance and memory in the query field.

OR, or

Placed between values, returns records for which at least one condition is true.

*performance* OR *memory* finds all records that contain either performance or memory in the query field.

performance* OR memory* finds all records that start with either performance or memory in the query field.

NOT, not

Placed before a value, returns only records that do not contain the value.

*performance* AND NOT LIKE *memory* finds all records that contain performance but not memory in the query field.

NOT (performance OR memory) finds all records that contain neither performance nor memory in the query field.

()

(opening and closing brackets)

Placed before and after the values and operators that are processed first, regardless of the default processing order.

(sun OR moon) AND NOT stars returns records that contain sun or moon, but not stars, in the query field.

LIKE, like

Placed before a value, returns records containing the value.

(performance* OR memory*) AND LIKE (problem) finds all records in which the query field starts with performance or memory and also includes problem.

The LIKE operator is case sensitive. To find matches regardless of case, see Simple Query Operators.