Understanding Wildcards

There might be times when you do not need an exact match reflected in the records you are retrieving. Suppose, for example, that you want to see all the states in your table that begin with the letters “AR.” After examining Table 4.2 let’s try some wildcard queries by example.

Table 4.2. Wildcard Character Examples
Wildcard Example Operation
* tr* selects train, translate, try, and so on Match any number of characters
? ?at selects bat, cat, rat, and so on Match any single character
[] [bfk]ind selects bind, find, and kind, but not mind, hind, and wind Match any single character within brackets
! [!bfk]ind selects mind, hind, and wind, but not bind, find, and kind Do not match any single character within brackets
-

Get Access 2002 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.