In Teradata SQL, a statement, a syntactic concept, has three components:
- A statement keyword, such as SELECT, CREATE TABLE, or ALTER PROCEDURE
- Zero or more expressions, functions, keywords, clauses, or phrases, such as WHERE, PRIMARY KEY, or UNIQUE PRIMARY INDEX
- A semicolon
In Teradata SQL, a request defines a unit of work that is transmitted from a client application to Teradata Database in a single message. A request is a semantic concept that has several components, including:
- One or more SQL statements
- Request-level CLIv2 options parcel
- Metadata about the request data
All individual SQL statements, called single statement requests, are also individual SQL requests, but not all SQL requests are also SQL statements because one request can contain an unlimited number of SQL statements. This special case is called a multistatement request, and it is the primary superficial characteristic that distinguishes a statement from a request in the Teradata world.
For more information about multistatement requests, see “Multistatement Requests”.