Skip to main content
Version: 24.3.x

Categories: String

ILIKE

Tests whether an expression matches a pattern. The comparison is case-insensitive.

Syntax

ILIKE(expression varchar, pattern varchar) → boolean

  • expression: The expression to compare.
  • pattern: The pattern that is compared to the expression.

Examples

ILIKE example
SELECT ILIKE ('pancake', '%Cake')
-- True

ILIKE(expression varchar, pattern varchar, escape_character varchar) → 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 ILIKE treat the wildcard as a regular character when it appears in expression.

Examples

ILIKE example
SELECT ILIKE ('50%_Off', '%50!%%','!')
-- True