# LIKE transformations

This section describes using LIKE transformations as a comparison operator.

Note: LIKE transformations and optimizations are disabled when you use locale-based collation. See "Character-based collation in Derby" in the Derby Developer's Guide for information about locale-based collation.

- Character string beginning with constant
  A LIKE predicate in which a column is compared to a character string that begins with a character constant (not a wildcard) is transformed into three predicates: one predicate that uses the LIKE operator, one that uses the >= operator, and one that uses the < operator.
- Character string without wildcards
  A LIKE predicate is transformed into a predicate that uses the = operator (and a NOT LIKE predicate is transformed into one that uses <>) when the character string does not contain any wildcards.
- Unknown parameter
  The situation is similar to those described above when a column is compared using the LIKE operator to a parameter whose value is unknown in advance (dynamic parameter, join column, and the like).

Parent topic: Predicate transformations
Related reference
BETWEEN transformations
Simple IN predicate transformations
NOT IN predicate transformations
OR transformations