forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2.1 KiB
2.1 KiB
ALTER TABLE RENAME
In GaussDB(DWS), the rename clause cannot contain the schema name. The DSC tool supports only the rename operation in the same schema. After the rename operation, the schema clause is removed from the conversion result. If the rename operation is performed across schemas, an error is reported.
Input
alter table `shce1`.`t1` rename to `t2`; alter table `shce1`.`t1` rename to t2; ALTER TABLE `charge_data`.`group_shengfen2022` RENAME `charge_data`.`group_shengfen2022_jiu`; ALTER TABLE `charge_data`.`group_shengfen2022` RENAME `charge_data`.`group_shengfen2022_jiu`, RENAME `charge_data`.`group_shengfen2023_jiu`, RENAME `charge_data`.`group_shengfen2024_jiu`;
Output
ALTER TABLE "shce1"."t1" RENAME TO "t2"; ALTER TABLE "shce1"."t1" RENAME TO "t2"; ALTER TABLE "charge_data"."group_shengfen2022" RENAME TO "group_shengfen2022_jiu"; ALTER TABLE "charge_data"."group_shengfen2022" RENAME TO "group_shengfen2022_jiu", RENAME TO "group_shengfen2023_jiu", RENAME TO "group_shengfen2024_jiu";
Parent topic: Table (Optional Parameters and Operations)