We'd like to write this query:
select * from table
where col1 != 'blah' and col2 = 'something'
We want the query to include rows where col1 is null (and col2 = 'something'). Currently the query won't do this for the rows where col1 is null. Is the below query the best and fastest way?
select * from table
where (col1 != 'blah' or col1 is null) and col2 = 'something'
Alternatively, we could if needed update all the col1 null values to empty strings. Would this be a better approach? Then our first query would work.
Update: Re: using NVL: I've read on another post that this is not considered a great option from a performance perspective.