title: Stored Procedure in H2 Database
body: <p>I am new to database and recently started writing test cases for H2 database.
  I want to know how to test a stored procedure in Eclipse. I have seen the following:</p>
  
  <p><a href="http://www.h2database.com/html/features.html#user_defined_functions" rel="noreferrer">http://www.h2database.com/html/features.html#user_defined_functions</a></p>
  
  <p><a href="https://stackoverflow.com/questions/4955521/how-to-create-procedure-in-h2">How to CREATE PROCEDURE in H2</a></p>
  
  <p>The sample code given in the h2database link,</p>
  
  <pre><code>"CREATE ALIAS NEXT_PRIME AS $$
  String nextPrime(String value) {
      return new BigInteger(value).nextProbablePrime().toString();
  }
  $$;
  " 
  </code></pre>
  
  <ul>
  <li><p>Where should this be declared?and how to run it?</p></li>
  </ul>
  
  <p>PS - I have the H2 JAR file and am testing it.</p>
  
  <p>If someone can tell me how to write a simple stored procedure in Java for H2, it would be of great help.</p>
  
  <p>Also is there any equivalent of the following in H2?</p>
  
  <p>"begin dbms_output" ?</p>
  
  <p>Thanks.</p>