I get you point!

You see, i was trying very hard to avoid using NOT IN/NOT EXISTS but it turns out that the situation is worse now that i scan the table twice.

This is the original query:

select A from table_t
where B not in ('ABC','DEF') and C ='LS'

I guess i just have to live with it.

Thanks abhaysk!