Skip to content · ⁨Passer au contenu⁩
English

Matching text patterns with LIKE

= only matches text exactly. To match a pattern, use LIKE with two wildcards:

  • % stands for any run of characters (including none)
  • _ stands for exactly one character

'S%' means "starts with S". '%a%' means "contains an a". '_o%' means "an o as the second letter".

Français

Correspondre des motifs de texte avec LIKE

= ne correspond au texte qu'exactement. Pour correspondre à un motif, utilisez LIKE avec deux caractères génériques :

  • % représente toute suite de caractères (y compris aucune)
  • _ représente exactement un caractère
SELECT name FROM student WHERE name LIKE 'S%';

'S%' signifie « commence par S ». '%a%' signifie « contient un a ». '_o%' signifie « un o comme deuxième lettre ».

Handout · ⁨Fiche de cours⁩

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP