[NOT] LIKE

Purpose

This is similar to predicate [NOT]REGEXP_LIKE, but with only simple pattern matching.

Syntax

NOT LIKE PREDICATE

Usage Notes

The following table lists the special characters you can use in this predicate:

Special Characters Description
_

Wildcard for exactly one character

%

Wildcard for any number of characters (including no characters at all)

esc_chr

Character with which the characters _ and % can be used literally in a pattern. By default this is the session variable DEFAULT_LIKE_ESCAPE_CHARACTER (see ALTER SESSION for more information).

Example
SELECT 'abcd' LIKE 'a_d' AS res1, '%bcd' like '\%%d' AS res2;