Ok, This is a dumb one . . . .
Select * from <table> where <col1> is null and <col2> = 1;
<col1> is varchar2(5byte) no defalut value
<col2> is number default of -1
Why will my above query not return any records? I know for a fact that the query SHOULD return a result set, but I’m getting nothing.
If I do:
Select * from <table> where <col1> is null;
I get 127531 records returned
If I do:
Select * from <table> where <col2> = 1;
I get 86342 records returned
Does Oracle deal with null values in a weird way? I’m an MSSQL kinda person.
From what you’re writing I’m not convinced that the query should return a record .. seems to me that you haven’t got any rows that satisfy both conditions.
Maybe you want to
ORthe two conditions (getting the records that satisfy any one of the two conditions)?