Statement Responses | SQL Fundamentals | Teradata Vantage - Statement Responses - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
zwv1557098532464.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantage™

Response Types

The 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, the 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 Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 :

  • SQLSTATE
  • SQLCODE
  • ACTIVITY_COUNT