Categories: String
LIKE
Tests whether an expression matches a pattern. The comparison is case-sensitive.
Syntax
expression LIKE pattern → boolean
- expression: The expression to compare.
- pattern: The pattern that is compared to the expression.
Examples
SELECT 'pancake' LIKE '%cake'
-- True
expression LIKE pattern ESCAPE escape_character → boolean
- expression: The expression to compare.
- pattern: The pattern that is compared to the expression.
- escape_character: Putting escape_character before a wildcard in pattern makes LIKE treat the wildcard as a regular character when it appears in expression.
Examples
SELECT '50%_Off' LIKE '%50!%%' ESCAPE '!'
-- True
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.