Data Definition Language Statements - Teradata Vantage - Analytics Database

Database Introduction

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-09-27
dita:mapPath
gtm1628096154303.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dsm1472253642401
lifecycle
latest
Product Category
Teradata Vantageā„¢

You use DDL statements to define the structure and instances of a database.

The following table lists some basic DDL statements. The list is not exhaustive.

Statement Action
CREATE Defines a new database object, such as a database, user, table, view, trigger, index, macro, stored procedure, user-defined type, user-defined function, or user-defined macro.
DROP Removes a database object.
ALTER Changes a table, column, referential constraint, trigger, or index.
ALTER PROCEDURE Recompiles an external stored procedure.
MODIFY Changes a database or user definition.
RENAME Changes the name of a table, trigger, view, stored procedure, or macro.
REPLACE Replaces a macro.
SET Specifies time zone, collation, or character set for a session.
COLLECT Collects optimizer or QCD statistics on a column, group of columns, or index.
DATABASE Specifies a default database.
COMMENT Inserts or retrieves a text comment for a database object.

Successful execution of a DDL statement automatically creates, updates, or removes entries in the Data Dictionary. For information about the contents of the Data Dictionary, see Teradata Vantageā„¢ - Data Dictionary, B035-1092.