Table 26. Compound Query Operators
Operator
|
Description
|
Example
|
AND, and
|
Placed between values, returns only records for which all the given 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.
|
()
|
Surrounds the values and operators that will be 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. Note that the LIKE operator is case sensitive. To find matches regardless of case, see (~).
|