Wildcard Characters You Can Use with the LIKE Operator
The following table describes wildcard characters that you can use with the LIKE operator.
Character | Description |
---|---|
* |
Replace zero or more characters. For example:
This example returns all records whose last name starts with Sm. For example, Smith, Smythe, Smart, and so on. For example:
This example returns all records whose Last Name field includes om. For example, Thomas, Thompson, Tomlin, and so on. Using the * (asterisk) wildcard to find all entries in a field might cause a performance problem. If it does, then you can use IS NOT NULL instead. For more information, see NULL Operator. |
? |
Replace one character. For example:
This example returns all records whose first name is three characters long and does not start with the letters Da. For example, it returns records that include Ted, Tom, and Sam. It does not return records that start with Dax or Dan. For example:
This example returns all records whose first name is three characters long and does not include o as the middle character. For example, it returns Ted and Sam. It does not return Tom or Bob. |