In SQL, wildcard characters are used with the SQL LIKE operator.
SQL wildcards are used to search for data within a table.
Wildcard: %, _, [charlist], [^charlist], [!charlist]
--
The following SQL statement selects all customers with a City containing the pattern "es":
SELECT * FROM Customers
WHERE City LIKE '%es%';
----
The following SQL statement selects all customers with a City starting with "L", followed by any character, followed by "n", followed by any character, followed by "on":
SELECT * FROM Customers
WHERE City LIKE 'L_n_on';
----
The following SQL statement selects all customers with a City NOT starting with "b", "s", or "p":
SELECT * FROM Customers
WHERE City LIKE '[!bsp]%';
-----