Data Definition Language | SQL Fundamentals | Teradata Vantage - Data Definition Language - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
uhe1592872955107.ditamap
dita:ditavalPath
uhe1592872955107.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.

Data definition language statements perform the following functions:
  • 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 DDL statement can be entered as:
  • 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.

Related Information

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.