Antipattern: Pattern Matching Predicates
Explore SQL pattern matching predicates like LIKE and regular expressions. Understand their common use for keyword searches, the performance issues they cause, and how they lead to inaccurate matches. Learn why these methods are often inefficient for scalable text search solutions.
SQL provides pattern-matching predicates for comparing strings, and this is the first solution most programmers use when searching for keywords.
Using pattern matching LIKE predicates
The most widely supported of these is the LIKE predicate.
The LIKE predicate supports a wildcard (%) that matches zero or more characters. Using this wildcard before and after a keyword matches any string that contains that word. The first wildcard matches ...