René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

DDL Statements [Oracle]

DDL stands for data definition language. DDL statements are SQL Statements that define or alter a data structure such as a table. Hence, a typical DDL statement is create table or alter table.

Implicit commits

In Oracle, a (successful) DDL statement implicitely commits a transaction;
SQL> create table ddl_test_1 (a number);
SQL> insert into ddl_test_1 values (1);
SQL> commit;
SQL> insert into ddl_test_1 values (2);
SQL> create table ddl_test_2 (a number);
SQL> rollback;
The create table statement implicitely commited the transaction. The insertion of the value 2 into ddl_test_1 cannot be rolled back any more.
SQL> select * from ddl_test_1;

         A
----------
         1
         2

Data dictionary

Since DDL changes definitions of database objects, a DDL is always reflected in the data dictionary.

Links

See also DML statements.