Simple Examples - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Valid Character Literals

'Los Angeles'
''

Character String Containing an Apostrophe

To embed an apostrophe (or single quotation mark) in a character literal, double it.

'He said ''yes'' to her question'

Character Literals Composed of Segments

Multiple strings are treated as if concatenated into one character literal.

('AA' 'BB') is ('AA' || 'BB')
(_Unicode 'AA' _Latin 'BB') is (_Unicode 'AA' || _Latin 'BB')

Character Set Specification

To indicate that the characters in a literal are within the repertoire of the LATIN character set, use the _Latin identifier.

CREATE TABLE table1(Name CHAR(30));
INSERT INTO table1 (_Latin 'Sandoval');

The _Latin identifier does not change the server character set of the character literal data type, which is always UNICODE.

SELECT TYPE (_Latin 'Sandoval');

returns:

Type('Sandoval')
---------------------------------
VARCHAR(8) CHARACTER SET UNICODE;