forked from docs/doc-exports
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>
33 lines
4.6 KiB
HTML
33 lines
4.6 KiB
HTML
<a name="EN-US_TOPIC_0000001233510089"></a><a name="EN-US_TOPIC_0000001233510089"></a>
|
|
|
|
<h1 class="topictitle1">DROP SYNONYM</h1>
|
|
<div id="body1578896975701"><div class="section" id="EN-US_TOPIC_0000001233510089__sac43a36fc4584291b3f982cffd2f1c5e"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001233510089__ae645c03d9891404f903f7a2ea4a9d088"><strong id="EN-US_TOPIC_0000001233510089__b1029719305198">DROP SYNONYM</strong> is used to delete a synonym object.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233510089__s2a8623a1da274962ae7221e730ff8bd2"><h4 class="sectiontitle">Precautions</h4><p id="EN-US_TOPIC_0000001233510089__af6d5285915f540a38ba39e3ee874716e">Only a synonym owner or a system administrator can run the <strong id="EN-US_TOPIC_0000001233510089__b1221615563222">DROP SYNONYM</strong> command.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233510089__s14f36ca21e0f4a0ebd90747b4903ece2"><h4 class="sectiontitle">Syntax</h4><div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233510089__s9702919e7d04498c88c3542d8cb6f993"><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="n">SYNONYM</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">synonym_name</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>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233510089__sb96797285efa4317bf1f090d0cb04672"><h4 class="sectiontitle">Parameter Description</h4><ul id="EN-US_TOPIC_0000001233510089__u8d9591caae194f5b80e772af8b17247d"><li id="EN-US_TOPIC_0000001233510089__l61d605616c7f495194e2040e36658748"><strong id="EN-US_TOPIC_0000001233510089__ab4a55f5667bb41658efa9906f50d8cd9">IF EXISTS</strong><p id="EN-US_TOPIC_0000001233510089__adc0273b48e0142548f2a590858922b14">Sends a notice instead of reporting an error if the specified synonym does not exist.</p>
|
|
</li><li id="EN-US_TOPIC_0000001233510089__l267554a634254d809274332f29e0915c"><strong id="EN-US_TOPIC_0000001233510089__b5588643124611">synonym_name</strong><p id="EN-US_TOPIC_0000001233510089__a00df00756d984fa98d0a772156109c7f">Name of a synonym (optionally with schema names)</p>
|
|
</li><li id="EN-US_TOPIC_0000001233510089__l989e0a8054084ca298c3ace6caf0a0e3"><strong id="EN-US_TOPIC_0000001233510089__a34a807925f7149dabb660fa7b1691267">CASCADE | RESTRICT</strong><ul id="EN-US_TOPIC_0000001233510089__u8eb465a4e4954c04af52880c8d9012b8"><li id="EN-US_TOPIC_0000001233510089__l0aa57a277f334462bd49a59b13e64000"><strong id="EN-US_TOPIC_0000001233510089__en-us_topic_0058965805_b842352706195927">CASCADE</strong>: automatically deletes objects (such as views) that depend on the synonym to be deleted.</li><li id="EN-US_TOPIC_0000001233510089__l3fe8d9d9a85b49899dd42530dfeffcf5"><strong id="EN-US_TOPIC_0000001233510089__b84235270693358">RESTRICT</strong>: refuses to delete the synonym if any objects depend on it. This is the default.</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233510089__sd68189bed9bf4e719c7df1a3559fdb6d"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001233510089__p13601016184112">Delete synonyms:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233510089__screen6827165464014"><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="n">SYNONYM</span><span class="w"> </span><span class="n">t1</span><span class="p">;</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001233510089__sbfbbf8a8078b495b9e4ed3a459a7fc37"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001233510089__abac143991a694bcb8ac1f177fb0babac"><a href="dws_06_0140.html">ALTER SYNONYM</a> and <a href="dws_06_0176.html">CREATE SYNONYM</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>
|
|
|