title: Oracle function with select all from tables
body: <pre><code>SELECT DISTINCT L.* FROM LABALES L , MATCHES M 
  WHERE M.LIST LIKE '%ENG' 
  ORDER BY L.ID
  </code></pre>
  
  <p>I need to create function with this select, I tried this but it doesn't work.</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION getSoccerLists
  RETURN varchar2  IS 
  list varchar2(2000);
  BEGIN
     SELECT DISTINCT L.* FROM LABALES L , MATCHES M 
     WHERE M.LIST LIKE '%ENG' 
     ORDER BY L.ID
     return list;
  END;
  </code></pre>
  
  <p>How will I create function that returns all from table L.</p>
  
  <p>Thanks</p>