Invoking SQL Statements
SQL provides several ways to invoke an executable SQL statement:
Executable SQL Statements
An executable SQL statement performs an action. The action can be on data or on a transaction or some other entity at a higher level than raw data.
Some examples of executable SQL statements include:
Most executable SQL statements can be performed interactively from a terminal using an SQL query manager like BTEQ or Teradata SQL Assistant.
The following types of executable SQL commands cannot be performed interactively:
These statements can only be used within an embedded SQL or stored procedure application.
Nonexecutable SQL Statements
A nonexecutable SQL statement is one that declares an SQL statement, object, or host or local variable to the preprocessor or stored procedure compiler. Nonexecutable SQL statements are not processed during program execution.
Examples of nonexecutable SQL statements for embedded SQL applications include:
Examples of nonexecutable SQL statements for stored procedures include:
SQL Requests
A request to Teradata Database can span any number of input lines. Teradata Database can receive and perform SQL statements that are: