[Solved] SQL Query User has one record in the table but not another one [closed]


Getting employees for a particular leave type is strait forward

select employeeNO from table1 where leaveType="Sick Bank"

If an employee has more than one leave type then a query with <> could return multiple rows for an employee even if they do have a ‘Sick Bank’ row.

select employeeNO from table1 
where employeeNo not in (select employeeNO from table1 where leaveType="Sick Bank")

2

solved SQL Query User has one record in the table but not another one [closed]