×

sql · level 1 · unit 3 · lesson 4

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

finds text that fits a .

= needs an exact match. LIKE is looser: it checks whether text fits a pattern. Patterns use the %, which stands for any letters at all, or none.

'The%' means starts with The. '%Cats' means ends with Cats. '%of%' means has of somewhere inside. The pattern still goes in single quotes.

LIKE does not mind capitals, so 'the%' finds The Last Biscuit too.

SELECT title FROM films WHERE title LIKE 'The%';

A pattern with no % must match the whole text, a lot like =.