Database Reference
In-Depth Information
Table 6.2 Wildcard Operators
Wildcard Operator
Description
%
This wildcard operator represents any string of characters,
for example, “A%” means any string that starts with A.
_ (Underscore)
This wildcard operator represents any single character; for
example, “A_” is any two-letter string that starts with A.
[]
This wildcard operator speciies a range of characters, for
example, “A[a-c]” means any two-letter string that starts
with A and ends with a or b or c.
Figure 6.20
Use LIKE operator with wildcard.
Figure 6.21
Use NOT logical operator.
Five students with their last names starting from A to D are selected. In the next example, we
are going to use the NOT operator to select students who are not advised by the faculty member
with the faculty id 3 (Figure 6.21).
Students who are advised by the faculty member with the id 3 are not included in the output
of the query.
Any combination of the three logical operators (AND, OR, and NOT) can be used to select
data with more complicated search conditions. For example, if you want to select the ids of the
Search WWH ::




Custom Search