Files
doris/docs/en/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-RENAME.md
Mingyu Chen 74a482ca7f [fix] fix docs build bug (#9293)
After this PR #9272, the `docs/build_help_zip.sh` will run failed.
This PR fix this issue.
But the help module still has some parse problem, I will fix it in next PR.

This CL mainly changes:
1. fix `docs/build_help_zip.sh` error
2. remove `sql-reference-v2` to `sql-reference`
3. modify build extension github action to run `docs/build_help_zip.sh`
2022-04-28 22:19:04 +08:00

1.9 KiB

title, language
title language
ALTER-TABLE-RENAME en

ALTER-TABLE-RENAME

Name

ALTER TABLE RENAME

Description

This statement is used to rename certain names of existing table properties. This operation is synchronous, and the return of the command indicates the completion of the execution.

grammar:

ALTER TABLE [database.]table alter_clause;

The alter_clause of rename supports modification of the following names

  1. Modify the table name

grammar:

RENAME new_table_name;
  1. Modify the rollup index name

grammar:

RENAME ROLLUP old_rollup_name new_rollup_name;
  1. Modify the partition name

grammar:

RENAME PARTITION old_partition_name new_partition_name;

Example

  1. Modify the table named table1 to table2
ALTER TABLE table1 RENAME table2;
  1. Modify the rollup index named rollup1 in the table example_table to rollup2
ALTER TABLE example_table RENAME ROLLUP rollup1 rollup2;
  1. Modify the partition named p1 in the table example_table to p2
ALTER TABLE example_table RENAME PARTITION p1 p2;

Keywords

ALTER, TABLE, RENAME

Best Practice