Separators | SQL Fundamentals | VantageCloud Lake - Separators - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The following sections describes separators.

Lexical Separators

A lexical separator is a character string that can be placed between words, literals, and delimiters without changing the meaning of a statement.

Valid lexical separators are any of the following.
  • Comments
  • Pad characters (several pad characters are treated as a single pad character except in a string literal)
  • RETURN characters (X’0D’)

Statement Separators

The SEMICOLON is a Teradata SQL statement separator.

Each statement of a multiple-statement request must be separated from any subsequent statement with a semicolon.

The following multiple-statement request shows the semicolon as a statement separator.

SHOW TABLE Payroll_Test ; INSERT INTO Payroll_Test
(EmpNo, Name, DeptNo) VALUES ('10044', 'Jones M',
'300') ; INSERT INTO ...

For statements entered using BTEQ, a request terminates with an input line-ending semicolon unless that line has a comment, beginning with two dashes (- -). Everything to the right of the - - is a comment. The semicolon must be on the following line.

The SEMICOLON as a statement separator in a multiple-statement request is a Teradata extension to the ANSI/ISO SQL:2011 standard.

Related Information

For an explanation of comment lexical separators, see Comments.