title: mysql stored function: how to select multiple results and process them
body: <p>mysql stored function: how to select multiple results and process them. For example,</p>
  
  <pre><code>create function hello() return decimal(10,2) determistic begin
  
     select value1, value2 from Foo;
     // process multiple rows in result set here
     for (....) {
  
     }
  
   end
  </code></pre>