Wildcard Characters - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

The % and _ characters may be used in any combination in pattern_expression.

Character Description
% (PERCENT SIGN) Represents any string of zero or more arbitrary characters.

Any string of characters is acceptable as a replacement for the percent.

_ (LOW LINE) Represents exactly one arbitrary character.

Any single character is acceptable in the position in which the underscore character appears.

The underscore and percent characters cannot be used in a pattern. To get around this, specify a single escape character and pattern_expression. For details, see ESCAPE Feature of LIKE.

The following table describes how the metacharacters % and _ (and their fullwidth equivalents) behave when matching strings for server character sets. ANSI only defines the single byte spacing underscore and percent sign metacharacters.

Teradata SQL extends the permissible metacharacter set for the LIKE predicate to include the fullwidth underscore and the fullwidth percent sign.

Server Character Set Metacharacter Character or Characters to Match
ANSI Mode Teradata Mode
KANJI1 Spacing underscore One single-byte or multibyte character. One single-byte character.
Fullwidth spacing underscore One single-byte or multibyte character. One single-byte or multibyte character.
Percent sign Sequence of single-byte or multibyte characters. Sequence of single-byte or multibyte characters.
Fullwidth percent sign Sequence of single-byte or multibyte characters. Sequence of single-byte or multibyte characters.
UNICODE

LATIN

KANJISJIS

Fullwidth spacing underscore None.

To maintain compliance with ANSI SQL standard, these characters are not treated as metacharacters.

Fullwidth percent
GRAPHIC Fullwidth spacing underscore One GRAPHIC character.
Fullwidth percent sign Sequence of GRAPHIC characters.