Data Definition Statements

Data Definition Language (DDL) statements are used to create and maintain Oracle database objects. Because DDL statements can perform so many different functions, there are a large number of them, and many have a wide range of options and syntax choices. This section provides a reference to the syntax of these DDL SQL statements. (Data Manipulation Language, or DML, statements are described separately later in this chapter.)

In many cases, multiple DDL statements may operate on the same object type. For example, CREATE TABLE, ALTER TABLE, and DROP TABLE are all related DDL statements that operate on Oracle tables. For convenience, we have grouped these related DDL statements together in a single list. When you see a heading like CREATE/ALTER/DROP TABLE, this means that we provide the syntax for all three statements under that heading.

Many DDL statements are normally used only for administration of a database and are typically issued by a DBA. For this reason, many statements require specific privileges. Some statements also apply only when specific Oracle options, such as the Partition Option or Real Application Clusters, are installed.

Get Oracle in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.