본문 바로가기

LIKE, IN and BETWEEN

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
SELECT name FROM student WHERE name LIKE 'S%';

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

LIKE matches patterns with % and _; IN matches a list; BETWEEN includes both ends

교재 자료

로그인 또는 계정 만들기

IGCSE, A-Level & AP