Hi All,
I am trying to execute this kind of query that uses'Not in ' function but unable to get 'Nulls'
select * from table1 where col1 not in (select col2 from table2).
Here col1 is not primary key in table1 and col2 is not foreign key for col1. They store same kind of data.
There are few nulls for col1 in table 1 and no nulls for col2.
If i execute the above statement , the rows with nulls for col1 are not retrieving.
As these nulls are not in col2 of table2, they should be retrieved right?
I am trying to execute this kind of query that uses'Not in ' function but unable to get 'Nulls'
select * from table1 where col1 not in (select col2 from table2).
Here col1 is not primary key in table1 and col2 is not foreign key for col1. They store same kind of data.
There are few nulls for col1 in table 1 and no nulls for col2.
If i execute the above statement , the rows with nulls for col1 are not retrieving.
As these nulls are not in col2 of table2, they should be retrieved right?
Comment