doc-exports/docs/dws/tool/dws_16_0120.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

39 lines
2.9 KiB
HTML

<a name="EN-US_TOPIC_0000001819336173"></a><a name="EN-US_TOPIC_0000001819336173"></a>
<h1 class="topictitle1">ALGORITHM</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_p8060118">MySQL 8.0.29 has extended the support for <strong id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_b945989183217">ALTER TABLE... ALGORITHM=INSTANT</strong>: Users can add columns instantly and delete columns instantly anywhere in a table, and evaluate row size limits when adding a column.</p>
<p id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_en-us_topic_0214164646_p143621254164014">This is not supported by GaussDB(DWS) and is deleted by DSC during the migration.</p>
<p id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_p1378811446111"><strong id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_b19930163035014">Input</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_screen2030119281336">ALTER TABLE runoob_alter_test ALGORITHM=DEFAULT;
ALTER TABLE runoob_alter_test ALGORITHM=INPLACE;
ALTER TABLE runoob_alter_test ALGORITHM=COPY;
ALTER TABLE runoob_alter_test ADD COLUMN COL_18 VARCHAR(64) DEFAULT '00', ALGORITHM=INSTANT;
ALTER TABLE runoob_alter_test MODIFY COLUMN dataType7 BIGINT, ALGORITHM=COPY;
ALTER TABLE `runoob_alter_test` ALGORITHM=DEFAULT, ALGORITHM=INPLACE, ALGORITHM=COPY;
ALTER TABLE `runoob_alter_test` ADD COLUMN dataType11 INT, ALGORITHM=DEFAULT, ALGORITHM=INPLACE, ALGORITHM=COPY;
ALTER TABLE runoob_alter_test CHANGE COLUMN dataType11 dataType12 SMALLINT ,ALGORITHM=INPLACE, ALGORITHM=COPY;
ALTER TABLE runoob_alter_test ALGORITHM=INPLACE, ALGORITHM=COPY, DROP COLUMN dataType12;</pre>
<p id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_p679625810112"><strong id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_b90418700231714">Output</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336173__en-us_topic_0000001658024754_en-us_topic_0000001447547997_screen17962325313">ALTER TABLE
"public"."runoob_alter_test"
ADD
COLUMN "col_18" VARCHAR(256) DEFAULT '00';
ALTER TABLE
"public"."runoob_alter_test" MODIFY "datatype7" BIGINT NULL DEFAULT NULL;
ALTER TABLE
"public"."runoob_alter_test"
ADD
COLUMN "datatype11" INTEGER;
ALTER TABLE
"public"."runoob_alter_test" CHANGE COLUMN "datatype11" "datatype12" SMALLINT NULL DEFAULT NULL;
ALTER TABLE
"public"."runoob_alter_test" DROP COLUMN "datatype12" RESTRICT;
DROP TABLE IF EXISTS "public"."runoob_alter_test";</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>