<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="return">
      </a>
      15.6.5.7 RETURN Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045176197840">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa1656604"><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">RETURN</span> <em class="replaceable">expr</em></code></pre>
  </div>
  <p>
   The
   <a class="link" href="return.html" title="15.6.5.7 RETURN Statement">
    <code class="literal">
     RETURN
    </code>
   </a>
   statement terminates
        execution of a stored function and returns the value
   <em class="replaceable">
    <code>
     expr
    </code>
   </em>
   to the function caller. There
        must be at least one
   <a class="link" href="return.html" title="15.6.5.7 RETURN Statement">
    <code class="literal">
     RETURN
    </code>
   </a>
   statement in a stored function. There may be more than one if
        the function has multiple exit points.
  </p>
  <p>
   This statement is not used in stored procedures, triggers, or
        events. The
   <a class="link" href="leave.html" title="15.6.5.4 LEAVE Statement">
    <code class="literal">
     LEAVE
    </code>
   </a>
   statement can
        be used to exit a stored program of those types.
  </p>
 </div>
 <br/>
</div>
