> > Now, i need to get the details of all employees who did
> > receive NONE of the salesorders. ie.. i wish to select the
> > records of table 'employee' whose 'emp_id' are not
> > there in table 'salesorder'.
> >
> > I need to accompolish in a single query!
This should work:
select e.emp_id
from employee as e left join salesorder as s
on e.emp_id = s.emp_id
where s.emp_id is null;
-- Joe