I'm hitting the wall how to interpret this:
select * from (
select '123' id1 from dual
) src
where src.id1 not in (select id1 from table1)
;
Gives me no rows
select * from (
select '123' id1 from dual
) src
where src.id1 in (select id1 from table1)
;
Also gives me no rows.
How is this possible in both cases?
Where not exists, on the other hand, works as intended. Table1 is not empty. And actually, yes - table1 has both nulls and non-nulls. Why would that make opposite conditions both wrong?
EDIT: Not full duplicate, since the listed similar question was why results are different, whilst here - why results are the same on an opposite condition - which may be confusing.