doc-exports/docs/dws/tool/dws_16_0121.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
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>
2024-05-16 07:35:25 +00:00

22 lines
2.1 KiB
HTML

<a name="EN-US_TOPIC_0000001772696168"></a><a name="EN-US_TOPIC_0000001772696168"></a>
<h1 class="topictitle1">ALTER TABLE RENAME</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_p8060118">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.</p>
<p id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_p712835684417"><strong id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_b11771161610455">Input</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_screen964739124513">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`;</pre>
<p id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_p981414459"><strong id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_b843718195457">Output</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001772696168__en-us_topic_0000001657865554_en-us_topic_0000001398482164_screen1156413104513">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";</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0119.html">Table (Optional Parameters and Operations)</a></div>
</div>
</div>