VeloDB Cloud
SQL Manual
Statments
Data-Definition-Statements
Alter
CANCEL-ALTER-TABLE

CANCEL-ALTER-TABLE

Name

CANCEL ALTER TABLE

Description

This statement is used to undo an ALTER operation.

  1. Undo the ALTER TABLE COLUMN operation

Syntax:

CANCEL ALTER TABLE COLUMN
FROM db_name.table_name
  1. Undo the ALTER TABLE ROLLUP operation

Syntax:

CANCEL ALTER TABLE ROLLUP
FROM db_name.table_name
  1. Batch cancel rollup operations based on job id

Syntax:

CANCEL ALTER TABLE ROLLUP
FROM db_name.table_name (jobid,...)

Note:

  • This command is an asynchronous operation. You need to use show alter table rollup to check the task status to confirm whether the execution is successful or not.
  1. Undo the ALTER CLUSTER operation

Syntax:

(To be implemented...)

Example

  1. Undo the ALTER COLUMN operation on my_table.

    [CANCEL ALTER TABLE COLUMN]

CANCEL ALTER TABLE COLUMN
FROM example_db.my_table;
  1. Undo the ADD ROLLUP operation under my_table.

[CANCEL ALTER TABLE ROLLUP]

CANCEL ALTER TABLE ROLLUP
FROM example_db.my_table;
  1. Undo the ADD ROLLUP operation under my_table according to the job id.

[CANCEL ALTER TABLE ROLLUP]

CANCEL ALTER TABLE ROLLUP
FROM example_db.my_table(12801,12802);

Keywords

CANCEL, ALTER, TABLE, CANCEL ALTER

Best Practice