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

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢
{ 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).