title: How to return more than 1 record?
body: <pre><code>create or replace procedure p_inout
    (v_emp_lname in varchar2)
    as
    v_first_name varchar2(20);
  begin
    select first_name into v_first_name
    from employees
    where last_name=v_emp_lname;
    dbms_output.put_line(v_first_name);
  end p_inout;
  /
  </code></pre>
  
  <p>The above code is used to return the first name when the person's last name was inputted.
  But there are many duplicate last names. And when i tried to run the query i got this error.</p>
  
  <pre><code>ORA-01422: exact fetch returns more than requested number of rows
  ORA-06512: at "HR.P_INOUT", line 6
  ORA-06512: at line 1
  01422. 00000 -  "exact fetch returns more than requested number of rows"
  *Cause:    The number specified in exact fetch is less than the rows returned.
  *Action:   Rewrite the query or change number of rows requested
  </code></pre>
  
  <p>How do I return more than records?</p>