LIKE
An operator that matches text against a pattern, where % stands for any run of characters and _ for exactly one.
In more detail
In SQLite, LIKE ignores the case of plain English letters by default; in PostgreSQL it is case-sensitive. For portable case-insensitive matching, compare lower(name) with a lower-case pattern.
Example
WHERE name LIKE '%cable%'Related terms
- ILIKE — An operator, available only in PostgreSQL, that works like LIKE but ignores upper and lower case.
- regular expression — A pattern language for matching text, where characters such as ., *, ^ and $ have special meanings.
- WHERE clause — The part of a query that keeps only the rows for which a condition is true.
Taught in
- Filtering With The WHERE Clause — PostgreSQL, Indexing & Relational Data Modeling