All Products
Search
Document Center

ApsaraDB for OceanBase:Drop columns

Last Updated:Jun 03, 2024

This topic describes the supported conversion scope of ALTER TABLE DDL operations for dropping columns during data migration from an Oracle database to an Oracle tenant of OceanBase Database.

Syntax

drop_column_clause:
{ SET UNUSED { COLUMN column
             | (column [, column ]...)
             }
  [ { CASCADE CONSTRAINTS | INVALIDATE }... ]
  [ ONLINE ]
| DROP { COLUMN column
       | (column [, column ]...)
       }
  [ { CASCADE CONSTRAINTS | INVALIDATE }... ]
  [ CHECKPOINT integer ]
| DROP { UNUSED COLUMNS
       | COLUMNS CONTINUE
       }
  [ CHECKPOINT integer ]
}

Supported operations

Dropping one or more columns at a time is supported. Sample code:

ALTER TABLE T DROP COLUMN C;
ALTER TABLE T DROP (C1,C2);

Unsupported operations

  • Dropping the SET UNUSED flag is not supported. An error will be returned when you perform this operation.

  • Dropping all columns marked as unused from tables by using the DROP UNUSED COLUMNS clause is not supported. An error will be returned when you perform this operation.

  • Resuming the column drop operation from the interrupted point by using the DROP COLUMNS CONTINUE clause is not supported. An error will be returned when you perform this operation.

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.

The option for specifying the CHECKPOINT attribute.