Using Subqueries
Subqueries are used when you want to change or bridge the default priority of the logical operators. Using the parentheses, you can isolate parts of a query. Subqueries included in parentheses are processed before all other parts of the query.
To create a subquery of the main condition row, follow these steps:
- Click the parentheses symbol located right to the green plus icon.
- Choose the required attribute from the Choose Attribute dialog box.
- Click 'OK' to confirm your choice.
The subquery will be added now.
- Now add the second condition of the subquery using the green plus icon.
When completed, you can see a complete subquery within the complex condition.
Notes on subqueries:
- It is possible to go deeper and create a new subquery of the subquery if required. The whole complex condition is always processed "from inside" - from the deepest subquery up to the main condition row.
- The subquery will be always evaluated first despite the OR operator having a lower priority than AND operator.
|