
Hi there! Wildcards in SQL make it easier to search for data when you don’t know the exact value.
Different databases use slightly different wildcard symbols, so here’s a quick and easy explanation for SQL Server, MS Access, and SQLite.
In SQL Server:
The
%symbol matches any number of characters. For example,'a%'finds values that start with “a”.The
_symbol matches exactly one character, so'a_'finds two-letter values starting with “a”.You can also use square brackets like
[a-f]to match any single character between “a” and “f”.To exclude characters, use
[^a-f]or[!a-f], which means anything not in that range.
In MS Access, the wildcards are slightly different:
The
*symbol works like%and matches any number of characters.The
?symbol represents exactly one character.The
#symbol matches a single digit (0–9).You can also use brackets like
[abc]to match a, b, or c, and![abc]to match anything except those letters.
In SQLite, wildcards work the same way as in SQL Server:
%matches any number of characters_matches a single character.
All of these wildcards are used with the LIKE operator to filter results more flexibly depending on your database system.
For more detailed explanations and examples of each wildcard, you can check this link:
Hope this helps! Let me know if you’d like more examples or support.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer