This question may be trivial or even stupid, but I was wondering if there is a way to use "IN" in more than one column by one match. For example, I use
select emp_id from employee where emp_id IN (select emp_id from employee_other)
How could I achieve something like
select emp_id from employee where emp_id,emp_org IN (select emp_id,emp_org from employee_other)
I know that I canβt use the following, because it will just do the union, while I need a choice based on matching one to one record.
select emp_id from employee where emp_id IN (select emp_id from employee_other) and emp_org in (select emp_org from employee)
Please note that I do NOT want to use EXCEPT.
Thanks guys,
source
share