title: ORA-01427: single-row subquery returns more than one row while using select
body: <p>I guess the above question has been asked a couple of times... I am still not able to implement it in my query.. in the following query there is a service table of couple of employees whose employee id is present in temp table .... each employee might have worked in different places.. hence there may be more than one record for each employee.. i am trying to find out details of the last posting ... but at the third line i get the mentioned error.. in case I use "IN" instead of equal to ..  I get multiple records for each employee id     </p>
  
  <pre><code>SELECT
      s.employee_id,
      s.from,
      s.to
  FROM 
      service s, temp t
  WHERE 
      t.employee_id = s.employee_id
      AND s.postnumber = (SELECT max(s1.postnumber)
                          FROM service s1, temp t1
                          WHERE t1.employee_id = s.employee_id)
  ORDER BY 
      t.employee_id;
  </code></pre>