Skip to content · ⁨コンテンツへスキップ⁩
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".

日本語

LIKE によるテキストパターンの一致

= はテキストを完全に一致させてのみ判定します。パターンに一致させるには、ワイルドカード2つを用いた LIKE を使用します:

  • % は任意の文字列(空白を含む)を表します
  • _ はちょうど1文字を表します
SELECT name FROM student WHERE name LIKE 'S%';

'S%' 表示“以S开头”。'%a%' 表示“包含字母a”。'_o%' 表示“第二个字母是o”。

Handout · ⁨プリント⁩

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP