title: MySql stored procedures: How to select from procedure table?
body: <p>Let's say we have a stored procedure selecting something from a table:</p>
  
  <pre>
  CREATE PROCEDURE database.getExamples() 
  SELECT * FROM examples;
  </pre>
  
  <p>How can I use the result from this procedure in a later select?
  (I've tried</p>
  
  <pre>
  SELECT * FROM (CALL database.getExamples())
  </pre>
  
  <p>but with no success.) 
  Should I use SELECT... INTO outVariable in the procedure? Or should I use a function returning the table instead?</p>