title: PL/SQL - Joining 3 tables get error column ambiguously defined
body: <p>I'm joining 3 tables in PL/SQL, the employees, departments and another employees for the managers. But i get this error when i run the script</p>
  
  <pre><code>Error report:
  ORA-06550: line 19, column 9:
  PL/SQL: ORA-00918: column ambiguously defined
  ORA-06550: line 9, column 3:
  PL/SQL: SQL Statement ignored
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  </code></pre>
  
  <p>I'm new in PL/SQL so can't understand what those error means.</p>
  
  <p>Here is the select statement inside the begin block where i get the error</p>
  
  <pre><code>   select e.first_name||' '||e.last_name AS Employee ,
            m.first_name||' '||m.last_name AS Manager ,
            e.job_id AS jobemp , 
            d.department_name AS Department ,
            e.salary AS Salary
    into ename, manager, jobid, depn, sal
    from employees e join departments d 
            on (e.department_id = d.department_id)
          join employees m
            on (e.manager_id = m.employee_id)
    where salary = (select min(salary) from employees)
    ;
  </code></pre>
  
  <p>Anyone who could help me identify this error? 
  thanks in advance.</p>