I've a problem in using NULL
with NOT
in sub-query, the code is:
Create table #FirstTable(i int)
Create table #secondTable(i int)
insert into #FirstTable(i) values (1),(2),(3),(4),(5)
insert into #secondTable(i) values (2),(3),(null)
select * from #FirstTable where i not in (select i from secondTable);
The expected result would be 1,4,5
but it gives null, how can I get the expected value?
The question is somehow similar to the referred question but specifically that question is including joints with different values