doc-exports/docs/dws/dev/dws_06_0123.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

44 lines
6.8 KiB
HTML

<a name="EN-US_TOPIC_0000001145910807"></a><a name="EN-US_TOPIC_0000001145910807"></a>
<h1 class="topictitle1">ALTER FOREIGN TABLE (for GDS)</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001145910807__s26b72b1858a44a5984f0fa6d9a84a67c"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001145910807__ae0128647c2ba4636aa6dfcf1ca144d9a"><strong id="EN-US_TOPIC_0000001145910807__b1413900204011">ALTER FOREIGN TABLE</strong> modifies a foreign table.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001145910807__sa59cc6cc8a984fd197fefdd1473b4d11"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001145910807__ac7442e4e9fb44c3fbc73c718a3dc12ce">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001145910807__s3f9d958138244c4385543e5644eb82e6"><h4 class="sectiontitle">Syntax</h4><ul id="EN-US_TOPIC_0000001145910807__uad6e9814236f47a7b03fec657b5a42f6"><li id="EN-US_TOPIC_0000001145910807__lc8276a40978b4ae08de491947deda8d2">Set the attributes of a foreign table.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145910807__s559f66636c2b404f9d0ca71ce44b8bb8"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ALTER</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="k">table_name</span><span class="w"></span>
<span class="w"> </span><span class="k">OPTIONS</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="err">{</span><span class="p">[</span><span class="w"> </span><span class="k">ADD</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">SET</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">DROP</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="k">option</span><span class="w"> </span><span class="p">[</span><span class="s1">'value'</span><span class="p">]</span><span class="err">}</span><span class="p">[,</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">]);</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001145910807__lf22f8a701a9840109aac94d27bd6ce08">Set a new owner.<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145910807__s226ab8de9c9b4110b4900a71f69c2026"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ALTER</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="k">IF</span><span class="w"> </span><span class="k">EXISTS</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="n">tablename</span><span class="w"></span>
<span class="w"> </span><span class="k">OWNER</span><span class="w"> </span><span class="k">TO</span><span class="w"> </span><span class="n">new_owner</span><span class="p">;</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001145910807__s3af932ca438d4159985b0e2e173ebf9d"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001145910807__ue04df989bfb94df7b21de1f71b56727c"><li id="EN-US_TOPIC_0000001145910807__l5751924bad3741048de7fe0c54fa52c2"><strong id="EN-US_TOPIC_0000001145910807__ab68e5e9f40424175ad0b48ba2394ab66">table_name</strong><p id="EN-US_TOPIC_0000001145910807__a260f54a4ce2948f9b5c6fde471f1828a">Specifies the name of an existing foreign table to be modified.</p>
<p id="EN-US_TOPIC_0000001145910807__ace53be82edf1469496ab7847cfe92246">Value range: an existing foreign table name.</p>
</li><li id="EN-US_TOPIC_0000001145910807__l876b51e0d1f94566bc57e6ef35948c17"><strong id="EN-US_TOPIC_0000001145910807__a8c3094828b9a401ba6fa53e55526b798">option</strong><p id="EN-US_TOPIC_0000001145910807__a44b04795e5194d0aaf9cb0f6d2e777ca">Name of the option to be modified.</p>
<p id="EN-US_TOPIC_0000001145910807__a443d9ec1164f4ff4bfbc78ea86b80533">Value range: See <a href="dws_06_0159.html#EN-US_TOPIC_0000001098990722__s949bbfb7d67e4891ac3744b6ecf3bb2a">Parameter Description</a> in <strong id="EN-US_TOPIC_0000001145910807__en-us_topic_0085032468_b84235270610562">CREATE FOREIGN TABLE</strong>.</p>
</li><li id="EN-US_TOPIC_0000001145910807__l7b3eb7d573c345b795328479824cbcac"><strong id="EN-US_TOPIC_0000001145910807__aa964267e49e84048895d8a116f841b9f">value</strong><p id="EN-US_TOPIC_0000001145910807__a82cc51a116dd42d5b28c97ac3b4d3c05">Specifies the new value of <strong id="EN-US_TOPIC_0000001145910807__b84235270622312">option</strong>.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001145910807__sb6bdf3156b4c4f63ba96b161ff6e7d56"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001145910807__p196526712341">Modify the <strong id="EN-US_TOPIC_0000001145910807__b12170123312395">customer_ft</strong> attribute of the foreign table. Delete the <strong id="EN-US_TOPIC_0000001145910807__b10871502397">mode</strong> option.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145910807__screen92479550349"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">ALTER</span><span class="w"> </span><span class="k">FOREIGN</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">customer_ft</span><span class="w"> </span><span class="k">options</span><span class="p">(</span><span class="k">drop</span><span class="w"> </span><span class="k">mode</span><span class="p">);</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001145910807__s24a4b2c38f5f4153ba492bc8ba7b2192"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001145910807__a930cb8b630c04d0eb1a376994081155d"><a href="dws_06_0159.html">CREATE FOREIGN TABLE (for GDS Import and Export)</a>, <a href="dws_06_0192.html">DROP FOREIGN TABLE</a></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_06_0118.html">DDL Syntax</a></div>
</div>
</div>