<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="execute">
      </a>
      15.5.2 EXECUTE Statement
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045176553376">
  </a>
  <a class="indexterm" name="idm46045176552304">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa65962340"><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">EXECUTE</span> <em class="replaceable">stmt_name</em>
    <span class="token punctuation">[</span><span class="token keyword">USING</span> <span class="token variable">@<em class="replaceable">var_name</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token variable">@<em class="replaceable">var_name</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   After preparing a statement with
   <a class="link" href="prepare.html" title="15.5.1 PREPARE Statement">
    <code class="literal">
     PREPARE
    </code>
   </a>
   , you execute it with an
   <a class="link" href="execute.html" title="15.5.2 EXECUTE Statement">
    <code class="literal">
     EXECUTE
    </code>
   </a>
   statement that refers to
      the prepared statement name. If the prepared statement contains
      any parameter markers, you must supply a
   <code class="literal">
    USING
   </code>
   clause that lists user variables containing the values to be bound
      to the parameters. Parameter values can be supplied only by user
      variables, and the
   <code class="literal">
    USING
   </code>
   clause must name
      exactly as many variables as the number of parameter markers in
      the statement.
  </p>
  <p>
   You can execute a given prepared statement multiple times, passing
      different variables to it or setting the variables to different
      values before each execution.
  </p>
  <p>
   For examples, see
   <a class="xref" href="sql-prepared-statements.html" title="15.5 Prepared Statements">
    Section 15.5, “Prepared Statements”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
