Database Reference
In-Depth Information
Figure 7.3
The OR Logical
Operator.
<expression> OR <expression> such that either expression yields
TRUE. This example is the same as the last except that either expres-
sion can be true. The result in Figure 7.3 shows any artists either in
the USA or with the vowel “a” in their names.
SELECT NAME, COUNTRY FROM ARTIST
WHERE COUNTRY = 'USA' OR NAME LIKE '%a%';
<expression> { AND | OR } NOT <expression> yields TRUE if both
expressions (AND), or either (OR), yield TRUE. Figure 7.4 shows
artists in the USA as long as the vowel “a” is not in their names.
SELECT NAME, COUNTRY FROM ARTIST
WHERE COUNTRY = 'USA' AND NOT NAME LIKE '%a%';
 
Search WWH ::




Custom Search