I have A table department table B table employee table SelectByid is according to the department ID to check staff Such as Byid=1 out of a set of employee Byid=2 out another group So the question is If I have Byid 1 and 2 is out at the same time employees have one and again 2 to do