LIKE Wildcard in SQL

Level 249 keystrokes

LIKE with % wildcard matches any sequence of characters.

SQL code

1SELECT
-- Returns the name of each matching product
2 name
3FROM
4 products
5WHERE
-- % matches any sequence of characters, including none
-- 'App%' matches names starting with App, such as Apple and Application
6 name LIKE 'App%';

Output

+-------------+
| name        |
+-------------+
| Apple       |
| Application |
+-------------+
2 rows in set
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this SQL code and how often they appear.

  • '× 2
  • ;× 1
  • %× 1

More SQL examples at level 2

← SQL typing practice