In general, null means no value.
select substr ('abcd',2, 1) from dual; -- result: 'b' select substr ('a',2, 1) from dual; -- empty, because there is nothing at second position on string 'a'; select decode(substr('a',2,1),null, 'yes, is null') from dual; -- result: 'yes, is null' select decode('', null, 'yes, is null') from dual; -- result: 'yes, is null'
Update: Clearly, the choice of implementation. In most languages, for example, in Java, strings are placed in a memory region, and for a programmer, string variables are references to a region in memory. Thus, an empty string is a reference to a region of length 0, but this reference is not null. So, null is a different matter (no link), and I think you are: better.
source share