SQL Wildcard Characters
SQL Wildcard Characters
‹ Previous Next ›
Try it Yourself »
Wildcard Characters
Symbol Description
Symbol Description
SQL HOME
SQL Intro
SQL Syntax Demo Database
SQL Select
Below is a selection from the Customers table
SQL Select Distinct
used in the examples:
SQL Where
SQL Order By
CustomerID CustomerName ContactName
SQL And
SQL Or 1 Alfreds Maria Anders
SQL Not Futterkiste
SQL Insert Into
2 Ana Trujillo Ana Trujillo
SQL Null Values
Emparedados y
SQL Update
helados
SQL Delete
SQL Select Top 3 Antonio Moreno Antonio
SQL Aggregate Functions Taquería Moreno
SQL Min and Max
4 Around the Horn Thomas Hardy
SQL Count
SQL Sum
SQL Avg 5 Berglunds Christina
snabbköp Berglund
SQL Like snabbköp Berglund
SQL Wildcards
SQL In
SQL Between
SQL Aliases
SQL Joins
SQL Inner Join
SQL Left Join
SQL Right Join
SQL Full Join
SQL Self Join
SQL Union
SQL Group By 1. SQL Database Commands
SQL Having
SQL Exists
Best Database Managemen
SQL Any, All 2.
Software
SQL Select Into
SQL Insert Into Select
SQL Case
3. Online SQL Courses
SQL Null Functions
SQL Stored Procedures
SQL Comments
SQL Operators
SQL Unique
SELECT * FROM Customers
SQL Primary Key
WHERE CustomerName LIKE '%es';
SQL Foreign Key
SQL Check
Try it Yourself »
SQL Default
SQL Index
SQL Auto Increment
SQL Dates
SQL Views Example
SQL Injection
Return all customers that contains the pattern
SQL Hosting
'mer':
SQL Data Types
SELECT * FROM Customers
SQL References WHERE CustomerName LIKE '%mer%';
SQL Keywords
MySQL Functions Try it Yourself »
SQL Server Functions
MS Access Functions
SQL Quick Ref
Try it Yourself »
Example
Return all customers with a City starting with
"L", followed by any 3 characters, ending with
"on":
Try it Yourself »
Example
Return all customers starting with either "b", "s",
or "p":
Try it Yourself »
Example
Return all customers starting with "a", "b", "c",
"d", "e" or "f":
Try it Yourself »
Try it Yourself »
Combine Wildcards
Any wildcard, like % and _ , can be used in
combination with other wildcards.
Example
Return all customers that starts with "a" and are
at least 3 characters in length:
Try it Yourself »
Example
Return all customers that have "r" in the second
position:
Try it Yourself »
Without Wildcard
If no wildcard is specified, the phrase has to have
an exact match to return a result.
Example
Example
Return all customers from Spain:
Try it Yourself »
Microsoft Access
Wildcards
The Microsoft Access Database has some other
wildcards:
Exercise:
Select all records where the second letter of
the City is an "a".
Submit Answer »
‹ Previous Next ›
W3schools
Pathfinder
Track
your Sign Up Log in
progress