I know that it does consider \' \' as NULL
, but that doesn\'t do much to tell me why this is the case. As I understand the SQL specifications
According to official 11g docs
Oracle Database currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.
Possible reasons
val IS NOT NULL
is more readable than val != ''
val != '' and val IS NOT NULL