The SQL Data Definition Language (DDL) is a subset of the SQL language and consists of all SQL statements that support the definition of database objects.
- Create, drop, rename, alter, modify, and replace database objects
- Comment on database objects
- Collect statistics on a column set or index
- Establish a default database
- Set a different collation sequence, account priority, DateForm, time zone, and database for the session
- Set roles
- Set the query band for a session or transaction
- Begin and end logging
- Enable and disable online archiving for all tables in a database or a specific set of tables
Rules on Entering DDL Statements
- A single-statement request.
- The solitary statement, or the last statement, in an explicit transaction (in Teradata mode, one or more requests enclosed by user-supplied BEGIN TRANSACTION and END TRANSACTION statement, or in ANSI mode, one or more requests ending with the COMMIT keyword).
- The solitary statement in a macro.
DDL statements cannot be entered as part of a multistatement request.
Successful execution of a DDL statement automatically creates and updates entries in the Data Dictionary.
For detailed information about the function, syntax, and usage of Teradata SQL Data Definition statements, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.