wildcard characters

The asterisk (*), question mark (?), number sign (#), exclamation point (!), hyphen (-), and brackets ([ ]) are wildcard characters. You can use these characters in queries and expressions to include all records, file names, or other items that begin with specific characters or match a certain pattern. You can also use wildcard characters and matching characters to further refine a search when using an SQL statement.

Symbol Example Usage
* wh* finds what, white, and why

*at finds cat, bat, and what

Matches any number of characters, and can be used anywhere in the character string.
? b?ll finds ball, bell, and bill Matches any single character.
# 1#3 finds 103, 113, 123 Matches any single digit.
[ ] b[ae]ll finds ball and bell but not bill Matches any single character within the brackets.
! b[!ae]ll finds bill and bull but not bell or ball Matches any character not in the list.
- b[a-c]d finds bad, bbd, and bcd Matches any one of a range of characters.

Note   The wildcard characters * (asterisk), ? (question mark), # (number sign), and [ (opening bracket) can match themselves only if enclosed in brackets.