As I said in my description, some values will be NULL. I just thought that these would not be included in the select. I did not think that it would stop the subselect from working
It is common issue. But it has sense.
Regards
Pavel
users=# select count(u_id) from users where u_id not in (select distinct emp_u_id from employees where emp_u_id is not null); count ------- 393 (1 row)