Skip to main content
Version: 3.0

CANCEL ALTER TABLE

Description

Cancels the following operations performed with the ALTER TABLE statement on a given table:

  • Table schema: add and delete columns, reorder columns, and modify data types of columns.
  • Rollup index: create and delete rollup indexes.

This statement is a synchronous operation and requires you to have the ALTER_PRIV privilege on the table.

Syntax

  • Cancel schema changes.

    CANCEL ALTER TABLE COLUMN FROM [db_name.]table_name
  • Cancel changes to rollup indexes.

    CANCEL ALTER TABLE ROLLUP FROM [db_name.]table_name

Parameters

ParameterRequiredDescription
db_nameNoThe name of the database to which the table belongs. If this parameter is not specified, your current database is used by default.
table_nameYesThe table name.

Examples

Example 1: Cancel the schema changes to example_table in the example_dbdatabase.

CANCEL ALTER TABLE COLUMN FROM example_db.example_table;

Example 2: Cancel rollup index changes to example_table in your current database.

CANCEL ALTER TABLE ROLLUP FROM example_table;