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

= מתייחס רק לטקסט בדיוק. כדי להתאים דפוס, השתמש ב-LIKE עם שני מקרי ג'oker:

  • % מייצג כל רצף של תווים (כולל רצף ריק)
  • _ מייצג בדיוק תווה אחד
SELECT name FROM student WHERE name LIKE 'S%';

'S%' פירושו "מתחיל ב-S". '%a%' פירושו "מכיל an a". '_o%' פירושו "an o כאות השנייה".

Handout · ⁨חומר עזר⁩

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP