Loading section...

LIKE for pattern matching

Concepts: sqlLike

When exact matching is too restrictive, pattern matching lets you find rows based on partial values. Why use LIKE? The first pattern starts with Ann, the second ends with @company.com, and the third uses underscores for unknown digits. Wildcard Patterns Suffix Matching This filter keeps any email ending with @orbit.ai regardless of the username. The database scans the email column row by row and keeps entries whose suffix matches the wildcard pattern. Which pattern finds emails ending in .com? The percent wildcard % matches zero or more characters, while the underscore _ matches exactly one character. Place % before a term to match endings, after a term to match beginnings, or on both sides to match anywhere in the string.