<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="alter-procedure">
      </a>
      15.1.7 ALTER PROCEDURE Statement
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045189615696">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa96833201"><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">ALTER</span> <span class="token keyword">PROCEDURE</span> <em class="replaceable">proc_name</em> <span class="token punctuation">[</span><em class="replaceable">characteristic</em> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span>

<em class="replaceable">characteristic</em>: {
    <span class="token keyword">COMMENT</span> <span class="token string">'<em class="replaceable">string</em>'</span>
  <span class="token operator">|</span> <span class="token keyword">LANGUAGE</span> <span class="token keyword">SQL</span>
  <span class="token operator">|</span> { <span class="token keyword">CONTAINS</span> <span class="token keyword">SQL</span> <span class="token operator">|</span> <span class="token keyword">NO</span> <span class="token keyword">SQL</span> <span class="token operator">|</span> <span class="token keyword">READS</span> <span class="token keyword">SQL</span> <span class="token keyword">DATA</span> <span class="token operator">|</span> <span class="token keyword">MODIFIES</span> <span class="token keyword">SQL</span> <span class="token keyword">DATA</span> }
  <span class="token operator">|</span> <span class="token keyword">SQL</span> <span class="token keyword">SECURITY</span> { <span class="token keyword">DEFINER</span> <span class="token operator">|</span> <span class="token keyword">INVOKER</span> }
}</code></pre>
  </div>
  <p>
   This statement can be used to change the characteristics of a
      stored procedure. More than one change may be specified in an
   <a class="link" href="alter-procedure.html" title="15.1.7 ALTER PROCEDURE Statement">
    <code class="literal">
     ALTER PROCEDURE
    </code>
   </a>
   statement. However,
      you cannot change the parameters or body of a stored procedure
      using this statement; to make such changes, you must drop and
      re-create the procedure using
   <a class="link" href="drop-procedure.html" title="15.1.29 DROP PROCEDURE and DROP FUNCTION Statements">
    <code class="literal">
     DROP
      PROCEDURE
    </code>
   </a>
   and
   <a class="link" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
    <code class="literal">
     CREATE
      PROCEDURE
    </code>
   </a>
   .
  </p>
  <p>
   You must have the
   <a class="link" href="privileges-provided.html#priv_alter-routine">
    <code class="literal">
     ALTER ROUTINE
    </code>
   </a>
   privilege for the procedure. By default, that privilege is granted
      automatically to the procedure creator. This behavior can be
      changed by disabling the
   <a class="link" href="server-system-variables.html#sysvar_automatic_sp_privileges">
    <code class="literal">
     automatic_sp_privileges
    </code>
   </a>
   system
      variable. See
   <a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
    Section 27.2.2, “Stored Routines and MySQL Privileges”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
