title: Oracle: Return multiple values in a function
body: <p>I'm trying to return a multiple values in a %rowtype from a function using two table(employees and departments), but it not working for me.</p>
  
  <pre><code>create or replace function get_employee
   (loc in number)
  return mv_emp%rowtype
  as  
     emp_record mv_emp%rowtype;
  begin
     select a.first_name, a.last_name, b.department_name into emp_record 
     from employees a, departments b 
     where a.department_id=b.department_id and location_id=loc;
  
     return(emp_record);  
  end;
  </code></pre>