Pattern Matching : Introduction « Regular Expressions « MySQL Tutorial






SQL pattern matching allows you to

use '_' to match any single character and

use '%' to match an arbitrary number of characters (including zero characters).

In MySQL, SQL patterns are case-insensitive by default.

You do not use = or <> when you use SQL patterns.

Use the LIKE or NOT LIKE comparison operators.









24.1.Introduction
24.1.1.Regular Expressions
24.1.2.Pattern Matching
24.1.3.To find names beginning with 'J'
24.1.4.To find names ending with 'on'
24.1.5.To find names containing an 'a'
24.1.6.To find names containing exactly five characters, use five instances of the '_' pattern character