16.20 - Separators - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Fundamentals

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
zce1519094756513.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
toy1472253184295

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 multistatement request must be separated from any subsequent statement with a semicolon.

The following multistatement request illustrates 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. In this case, the semicolon must be on the following line.

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

Related Topics

For an explanation of comment lexical separators, see Comments.