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 | Usage | Example |
* | Matches any number of characters, and can be used anywhere in the character string | wh* finds what, white, and why *at finds cat, bat, and what |
? | Matches any single character | b?ll finds ball, bell, and bill |
# | Matches any single digit | 1#3 finds 103, 113, 123 |
[ ] | Matches any single character within the brackets | b[ae]ll finds ball and bell but not bill |
! | Matches any character not in the list | b[!ae]ll finds bill and bull but not bell or ball |
- | Matches any one of a range of characters | b[a-c]d finds bad, bbd, and bcd |
Note The wildcard characters * (asterisk), ? (question mark), # (number sign), and [ (opening bracket) can match themselves only if enclosed in brackets.