<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="drop-spatial-reference-system">
      </a>
      15.1.31 DROP SPATIAL REFERENCE SYSTEM Statement
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045183366176">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa17248593"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">SPATIAL</span> <span class="token keyword">REFERENCE</span> <span class="token keyword">SYSTEM</span>
    <span class="token punctuation">[</span><span class="token keyword">IF</span> <span class="token keyword">EXISTS</span><span class="token punctuation">]</span>
    <span class="token keyword"><em class="replaceable">srid</em></span>

<span class="token keyword"><em class="replaceable">srid</em></span>: <span class="token number"></span><em class="replaceable"><span class="token number">32</span><span class="token operator">-</span><span class="token datatype">bit</span> <span class="token keyword">unsigned</span> <span class="token datatype">integer</span></em><span class="token datatype"></span></code></pre>
  </div>
  <p>
   This statement removes a
   <a class="link" href="spatial-reference-systems.html" title="13.4.5 Spatial Reference System Support">
    spatial reference
      system
   </a>
   (SRS) definition from the data dictionary. It
      requires the
   <a class="link" href="privileges-provided.html#priv_super">
    <code class="literal">
     SUPER
    </code>
   </a>
   privilege.
  </p>
  <p>
   Example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa30194145"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">SPATIAL</span> <span class="token keyword">REFERENCE</span> <span class="token keyword">SYSTEM</span> <span class="token number">4120</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   If no SRS definition with the SRID value exists, an error occurs
      unless
   <code class="literal">
    IF EXISTS
   </code>
   is specified. In that case, a
      warning occurs rather than an error.
  </p>
  <p>
   If the SRID value is used by some column in an existing table, an
      error occurs. For example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa49228885"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">DROP</span> <span class="token keyword">SPATIAL</span> <span class="token keyword">REFERENCE</span> <span class="token keyword">SYSTEM</span> <span class="token number">4326</span><span class="token punctuation">;</span>
<span class="token output">ERROR 3716 (SR005)<span class="token punctuation">:</span> Can't modify SRID 4326. There is at
least one column depending on it.</span></code></pre>
  </div>
  <p>
   To identify which column or columns use the SRID, use this query:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa10169079"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>ST_GEOMETRY_COLUMNS <span class="token keyword">WHERE</span> SRS_ID<span class="token operator">=</span><span class="token number">4326</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   SRID values must be in the range of 32-bit unsigned integers, with
      these restrictions:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      SRID 0 is a valid SRID but cannot be used with
      <a class="link" href="drop-spatial-reference-system.html" title="15.1.31 DROP SPATIAL REFERENCE SYSTEM Statement">
       <code class="literal">
        DROP SPATIAL REFERENCE SYSTEM
       </code>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      If the value is in a reserved SRID range, a warning occurs.
          Reserved ranges are [0, 32767] (reserved by EPSG),
          [60,000,000, 69,999,999] (reserved by EPSG), and
          [2,000,000,000, 2,147,483,647] (reserved by MySQL). EPSG
          stands for the
      <a class="ulink" href="http://epsg.org" target="_blank">
       European Petroleum
          Survey Group
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Users should not drop SRSs with SRIDs in the reserved ranges.
          If system-installed SRSs are dropped, the SRS definitions may
          be recreated for MySQL upgrades.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
