doc-exports/docs/dws/dev/dws_06_0195.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

36 lines
5.0 KiB
HTML

<a name="EN-US_TOPIC_0000001145510939"></a><a name="EN-US_TOPIC_0000001145510939"></a>
<h1 class="topictitle1">DROP INDEX</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001145510939__sf9f6ca2c092e4deeaf97e42ac59a5b1d"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001145510939__a8a043063e75e4c12b1a81f4e83e82dc5"><strong id="EN-US_TOPIC_0000001145510939__b842352706175534">DROP INDEX</strong> deletes an index.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001145510939__s4c4e83681b334aad9ecedd4cb1b34fcd"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001145510939__a137450f16cd141f19445b0b850530d82">Only the owner of an index or a system administrator can run <strong id="EN-US_TOPIC_0000001145510939__b842352706175926">DROP INDEX</strong> command.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001145510939__sd8b12fdfb0064165a69836a2505808d2"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145510939__s0025e4b279e44cee94c8b5f840b264cf"><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">DROP</span><span class="w"> </span><span class="k">INDEX</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="w"> </span><span class="n">index_name</span><span class="w"> </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><span class="k">CASCADE</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="k">RESTRICT</span><span class="w"> </span><span class="p">];</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001145510939__s4724784f2f48418aac36ecc1a821c9ec"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001145510939__u5222f9dd8fa74aabba5fbc4443040125"><li id="EN-US_TOPIC_0000001145510939__l15cafdea3ee74c1395a51e2f58032382"><strong id="EN-US_TOPIC_0000001145510939__afc6b78aaa37e4943a70aae191b04aec0">IF EXISTS</strong><p id="EN-US_TOPIC_0000001145510939__a9d48275234494b93876756f7536bd4af">Sends a notice instead of an error if the specified index does not exist.</p>
</li><li id="EN-US_TOPIC_0000001145510939__l9632328a6be7460398ddcf976818e369"><strong id="EN-US_TOPIC_0000001145510939__ac5b042613cfa4514bc9936e02a739439">index_name</strong><p id="EN-US_TOPIC_0000001145510939__a031ddd0db01e4185a656b99dba1f2fc5">Specifies the name of the index to be deleted.</p>
<p id="EN-US_TOPIC_0000001145510939__ad035afa698da4dcea0f5f194167577ff">Value range: An existing index.</p>
</li><li id="EN-US_TOPIC_0000001145510939__lb97b27595ee24f279ca04843bdb6fc8a"><strong id="EN-US_TOPIC_0000001145510939__a894405099a394c488f627c5d32729f5f">CASCADE | RESTRICT</strong><ul id="EN-US_TOPIC_0000001145510939__u448e5c87cc3943c092133ea49a0903a9"><li id="EN-US_TOPIC_0000001145510939__l135475f954b9442aa30fa6e9e037fc5a"><strong id="EN-US_TOPIC_0000001145510939__b944489017124">CASCADE</strong>: automatically deletes all objects that depend on the index to be deleted.</li><li id="EN-US_TOPIC_0000001145510939__l24d6876eff634c78ab1baf6f21fef890"><strong id="EN-US_TOPIC_0000001145510939__b2644398317124">RESTRICT</strong> (default): refuses to delete the index if any objects depend on it.</li></ul>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001145510939__sfd7c747597194b288d053bcdba1444bf"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001145510939__p158593101582">Delete the <strong id="EN-US_TOPIC_0000001145510939__b1258434516336">ds_ship_mode_t1_index2</strong> index.</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001145510939__screen66325466715"><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">DROP</span><span class="w"> </span><span class="k">INDEX</span><span class="w"> </span><span class="n">tpcds</span><span class="p">.</span><span class="n">ds_ship_mode_t1_index2</span><span class="p">;</span><span class="w"></span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001145510939__safdd24b5540a4595919e605a8d3968a7"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001145510939__acc6f6a3d20a24d69afcc420714933117"><a href="dws_06_0128.html">ALTER INDEX</a>, <a href="dws_06_0165.html">CREATE INDEX</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>