16.20 - Statement Responses - 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

Response Types

Teradata Database responds to an SQL request with one of the following condition responses:
  • Success response, with optional warning
  • Failure response
  • Error response (ANSI session mode only)

Depending on the type of statement, Teradata Database also responds with one or more rows of data.

Multistatement Responses

A response to a request that contains more than one statement, such as a macro, is not returned to the client until all statements in the request are successfully executed.

Returning a Response

The manner in which the response is returned depends on the interface that is being used.

For example, if an application is using a language preprocessor, then the activity count, warning code, error code, and fields from a selected row are returned directly to the program through its appropriately declared variables. If the application is a stored procedure, then the activity count is returned directly in the ACTIVITY_COUNT status variable.

If you are using BTEQ, then a success, error, or failure response is displayed automatically.

Response Condition Codes

SQL statements also return condition codes that are useful for handling errors and warnings in embedded SQL and stored procedure applications.

For information about SQL response condition codes, see the following in SQL Stored Procedures and Embedded SQL:

  • SQLSTATE
  • SQLCODE
  • ACTIVITY_COUNT