- 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.
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: