NOT_LIKE

All functions > COMPARISON > NOT_LIKE

Returns TRUE if a string does NOT match a specified pattern with wildcards.

Syntax

NOT_LIKE(expr1, expr2[, escape])
sql

Arguments

ParameterTypeRequiredDescription
stringVARCHARYesString expression to test
patternVARCHARYesPattern string with wildcards (% for any characters, _ for single character)
escapeVARCHARNoOptional escape character to treat wildcards literally

Returns

BOOLEAN - TRUE if string does not match pattern, FALSE otherwise

Notes

  • Opposite of LIKE function
  • Uses SQL wildcard pattern matching
  • % matches zero or more characters
  • _ matches exactly one character
  • Case-sensitive matching
  • NULL inputs return NULL
  • Use ESCAPE clause to treat wildcard characters literally
  • Can be used with operator syntax: string NOT LIKE pattern

See also

Examples

Basic pattern matching

NULL handling

File extension filtering

Last update at: 2025/10/13 10:23:46