Teradata SQL statements define and manipulate the data stored in the database.
- Create or modify the table to export from
- Establish a database as an explicit table-name qualifier
- Add checkpoint specifications to a journal table
The following restrictions apply to Teradata SQL statements in FastExport job scripts:
- FastExport supports only the Teradata SQL statements listed in the following table.
- Except for the SELECT statement, the supported Teradata SQL statements must appear either before or after an export task specification. They cannot appear between the BEGIN EXPORT and the END EXPORT commands of an export task.
- The SELECT statement is supported only within an export task specification. It must appear after the BEGIN EXPORT command and before the END EXPORT command of an export task.
Teradata SQL statements supported by Teradata FastExport are listed in the following table. To use other Teradata SQL statements, exit FastExport and enter them from another application, such as Basic Teradata Query (BTEQ).
Teradata SQL Statement | Function |
---|---|
ALTER TABLE | Changes the column configuration or options of an existing table |
CHECKPOINT | Adds a checkpoint entry to a journal table |
COLLECT STATISTICS | Collects statistical data for one or more columns of a table |
COMMENT | Stores or retrieves comment string associated with a database object |
CREATE DATABASE CREATE MACRO CREATE TABLE CREATE VIEW |
Creates a new database, macro, table, or view |
DATABASE | Specifies a new default database for the current session |
DELETE | Removes rows from a table |
DELETE DATABASE | Removes all tables, views, and macros from a database |
DROP DATABASE | Drops the definition for an empty database from the Data Dictionary |
DROP TABLE | Removes a table from the database |
GIVE | Transfers ownership of a database to another user |
GRANT | Grants privileges to a database object |
INSERT | Inserts new rows to a table |
MODIFY DATABASE | Changes the options of an existing database |
RENAME | Changes the name of an existing table, view, or macro |
REPLACE MACRO REPLACE VIEW |
Redefines an existing macro or view |
REVOKE | Rescinds privileges to a database object |
SET QUERY_BAND ...FOR SESSION |
Allows a set of name-value pairs to be defined by the user and/or middle tier application so they can be customized to each application’s unique needs at the session level. Only SET QUERY_BAND...FOR SESSION is valid. Although the database accepts the SET QUERY_BAND...FOR TRANSACTION, Teradata FastExport rejects it, displays an error message and terminates.
|
SET SESSION COLLATION | Overrides the collation specification for the current session |
UPDATE | Changes the column values of an existing row in a table. |
DML VALIDTIME qualifier and NONTEMPORAL Semantics are now supported for INSERT, DELETE, UPDATE and ALTER TABLE commands.
For syntax and a complete description of each Teradata SQL statement, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144 and Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.