CANCEL-ALTER-TABLE
Name
CANCEL ALTER TABLE
Description
This statement is used to undo an ALTER operation.
- Undo the ALTER TABLE COLUMN operation
Syntax:
CANCEL ALTER TABLE COLUMN
FROM db_name.table_name
- Undo the ALTER TABLE ROLLUP operation
Syntax:
CANCEL ALTER TABLE ROLLUP
FROM db_name.table_name
- 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.
- Undo the ALTER CLUSTER operation
Syntax:
(To be implemented...)
Example
-
Undo the ALTER COLUMN operation on my_table.
[CANCEL ALTER TABLE COLUMN]
CANCEL ALTER TABLE COLUMN
FROM example_db.my_table;
- Undo the ADD ROLLUP operation under my_table.
[CANCEL ALTER TABLE ROLLUP]
CANCEL ALTER TABLE ROLLUP
FROM example_db.my_table;
- 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