Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Returning all data from a table
Select some columns
Filtering rows
Logic
Text patterns
18. The underscore wildcard (_)
To be or NULL to be
A bit of mathematics
Let's practice

Instruction

Nice! Now sometimes, we may have trouble remembering just one letter of a specific name. Imagine we want to find a user whose name is... Catherine? Katherine?

SELECT
  *
FROM User
WHERE Name LIKE N'_atherine';

The underscore wildcard (_) replaces exactly one character. If a particular row has a Name of Catherine or Katherine, it will be returned by the query.

Exercise

Select all columns for cars whose brand is N'Volk_wagen' (the underscore replaces one unknown character).

Stuck? Here's a hint!

Type:

SELECT
  *
FROM Car
WHERE Brand LIKE N'Volk_wagen';