You can use DDL statements to create, update, and delete database objects. This topic describes the background of and database objects supported by DDL statements.
Background
OceanBase Database issues an implicit COMMIT statement before and after a DDL statement. Therefore, DDL statements cannot be rolled back.
Note
In the CLI environment of OceanBase Client (OBClient), you can enter a DDL statement after the SQL prompt (>).
You can also enter a DDL statement in the ODC SQL Editor window.
Database objects supported by DDL statements
DDL statements in OceanBase Database support the following database objects:
Tables
The constraints and indexes on tables are included.
A table is the most basic unit of data storage.
Tables contain data that all users can access. Each table contains one or more rows. Each row contains one or more columns.
Views
A view displays the results of a query on the table.
You can use views in most cases where you can use tables. If the data you frequently access is distributed across multiple tables, a view is the best choice.
Custom functions
Custom types
Custom triggers
Custom stored procedures