TRUNCATE TABLE

2025-05-12 01:56:25  Updated

This topic describes the conversion scope of TRUNCATE TABLE DDL operations during data migration from an Oracle database to an Oracle-compatible tenant of OceanBase Database.

Syntax

TRUNCATE TABLE [schemaName.] tableName
[ {PRESERVE | PURGE} MATERIALIZED VIEW LOG ]
[ {DROP [ ALL ] | REUSE} STORAGE ] [ CASCADE ] ;

Supported operations

Truncating a table by using the TRUNCATE TABLE [schemaName.] tableName statement is supported. Example:

TRUNCATE TABLE sales;

Ignored clauses and options

Note

The following clauses and options will be ignored and will not be resolved or converted when they are specified in the synchronized DDL statements.

  • PRESERVE MATERIALIZED VIEW LOG

  • PURGE MATERIALIZED VIEW LOG

  • DROP STORAGE

  • DROP ALL STORAGE

  • REUSE STORAGE

  • CASCADE

Contact Us