LIKE Pattern in SQL
Level 361 keystrokes
LIKE '%@gmail.com' finds email addresses that end with @gmail.com; % matches any sequence of characters.
SQL code
1SELECT -- Returns the name and email columns2 name,3 email4FROM5 users6WHERE -- % matches any characters before @gmail.com -- So this finds every email address ending in @gmail.com7 email LIKE '%@gmail.com';Output
+-------+------------------+ | name | email | +-------+------------------+ | Alice | alice@gmail.com | | Bob | bob@gmail.com | +-------+------------------+ 2 rows in set
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.× 1@× 1%× 1