Monday, 28 September 2015

Teradata SQL Statement

Teradata SQL Statement
Function
ALTER TABLE
Changes the column configuration or options of an existing table
CHECKPOINT
Adds checkpoint entry to a journal table
COLLECT STATISTICS
Collects statistical data for one or more columns of a table
COMMENT
Stores or retrieves a 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
Removes an empty table from Teradata Database
EXECUTE
Specifies a user-created (predefined) macro for execution. The macro named in this statement resides in Teradata Database and specifies the type of DML statement (INSERT, UPDATE, DELETE, or UPSERT) being handled by the macro.
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
Sets the query band for a session
Note: The statement can be used in two ways:
SET QUERY_BAND = 'Document=XY1234; Universe=East;' FOR SESSION;

SET QUERY_BAND = NONE FOR SESSION;
Note: Teradata TPump parses and prevents sending a “SET QUERY_BAND ... FOR TRANSACTION;” statement to the Teradata Database.
SET SESSION COLLATION
Overrides the collation specification for the current session
SET SESSION OVERRIDE REPLICATION ON/OFF
Turn on/off replication service
UPDATE Statement and Atomic Upsert
Changes the column values of an existing row in a table


Credits:

No comments:

Post a Comment