Kevin L <[EMAIL PROTECTED]> writes: > However, getting employees who have NOT sold something always > returns zero rows: > SELECT emp_id FROM employee WHERE emp_id NOT IN (SELECT emp_id > FROM workorder); Probably you have some NULL values in workorder. See past discussions about why NOT IN and NULL don't get along very well (it's not a bug). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
- [GENERAL] problem with subselect: NOT IN Kevin L
- Re: [GENERAL] problem with subselect: NOT IN Patrik Kudo
- Re: [GENERAL] problem with subselect: NOT IN Peter Eisentraut
- Tom Lane