A Teradata SQL “request” is one or more Teradata SQL statements that are submitted as a single unit of work. A request is considered complete, or terminated, when either the “End of Text” character or the request “terminator” is encountered. The request terminator is a semicolon that is the last non-blank character on an input line. (A request terminator is optional except when the request appears within a Teradata SQL macro or is entered through ITEQ.)
A single-statement request consists of a solitary statement. For example:
SELECT * FROM Personnel.Employee;
A multi-statement request consists of two or more statements separated by semicolons. For example, this statement:
INSERT INTO TestDB.TA (Name) VALUES (’NameA’)
; SELECT * FROM TestDB.TA;
and this statement:
INSERT INTO TestDB.TA (Name) VALUES (’NameA’)
; SELECT * FROM TestDB.TA;
are both multi-statement requests. The first semicolon is a statement separator and the second semicolon is a request terminator.
Teradata SQL statements are used to:
For detailed information on the structure of Teradata SQL requests and the syntax of each Teradata SQL statement, refer to SQL Fundamentals (B035-1141).