We surely have to click it at least once before executing the query.
For now, let's click it and see the query generated in the query area. In the following
examples, we will click Update Query after each modification:
Chapter 13
[ 211 ]
We have selected two tables, but have not yet chosen any columns from the book
table, so this table is not mentioned in the generated query.
Criteria
In the Criteria box, line, we can enter a condition (respecting the SQL WHERE clause's
syntax) for each of the corresponding columns. By default, we have two criteria
rows. To find all authors with Smith in their name, we use a LIKE criterion??”LIKE
'%SMITH%'??”and click Update Query:
The Multi-Table Query Generator
[ 212 ]
We have another line available to enter an additional criterion. Let's say we want to
find the author 'Maria Sunshine' as well. This time, we use an = condition. The two
condition rows will be joined by the OR operator selected by default from the left side
of the interface:
Chapter 13
[ 213 ]
To better demonstrate that the OR operator links both the criteria rows, let's now add
a condition, LIKE '%8%', on the phone number:
By examining the positioning of the AND and OR operators, we can see that the first
conditions are linked by an AND (because AND is chosen under the name column)
and that the second row of conditions is linked to the rest by the OR operator.
Pages:
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204