LIKE/NOT LIKE Predicate Syntax | Teradata Vantage - 17.10 - LIKE/NOT LIKE Predicate Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)
{ expression [NOT] LIKE
    { pattern_expression | [ ALL | ANY | SOME ] ( subquery ) } |

  ( expression [,...]) } [NOT] LIKE [ ALL | ANY | SOME ]
    { ( subquery ) | ( pattern_expression [,...] ) }

} [ ESCAPE escape_character ]

Syntax Elements

expression
A character string or character string expression argument to be searched for the substring pattern_expression.
pattern_expression
A character expression for which expression is to be searched.
ALL
ANY
SOME
A quantifier that allows one or more expressions to be searched for one or more patterns or for one or more values returned by a subquery.
subquery
{ expr | ( expr [,...] ) } [ NOT ] LIKE quantifier (subquery)
A subquery that selects the same number of expressions as are specified in the expression or list of expressions.
The subquery cannot specify a SELECT AND CONSUME statement.
escape_character
Keyword/variable combination specifying a single escape character (single or multibyte).