Transactional DDL
Data Definition Language (DDL) statements are fully transactional in NuoDB.
This means that the changes do not occur until the transaction that made them successfully commits. If the transaction rolls back the DDL statements also rolls back. The same visibility rules apply to DDL in NuoDB as to all Data Manipulation Language (DML) statements.
NuoDB’s DDL statements are: CREATE
, ALTER
(except ALTER DATABASE
), DROP
, GRANT
, RENAME TABLE
, REVOKE
, and TRUNCATE
.
Statements managing users, grants and roles are also transactional. |
Exceptions:
-
ALTER DATABASE
is used to control on-disk encryption and garbage collection. These are not DDL, soALTER DATABASE
is not transactional. It runs immediately and cannot be rolled back. -
CREATE INDEX … ONLINE
uses two transactions (as described in CREATE INDEX). -
Partitioning DDL on an existing table is executed immediately by forcing the client transaction to commit and using a new dedicated transaction to run and commit the DDL. This applies only when using
ALTER TABLE
to change partitioning options. For a complete discussion on this topic, refer to Table Partitions and Storage Groups.
The full list of DDL statements (all defined in the SQL Statements reference section):
|
|
|
- |
|
|
|
|
|
- |
|
|
- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- |
|
|
- |