About DDL statements

2023-07-24 09:52:12  Updated

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

Before and after a DDL statement is executed, OceanBase Database will send an implicit COMMIT statement. Therefore, a DDL statement cannot be rolled back after being executed. We recommend that you back up data before you perform DDL operations.

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

The following database objects are supported for DDL statements in OceanBase Database:

  • Tables, including constraints and indexes

  • Views

  • Sequences

  • Synonyms

  • Custom functions

  • Stored procedures

  • Triggers

  • Packages and package bodies

Contact Us