Primarily as an SQL Server user I was suprised that in Oracle this syntax is valid:
select var
from table
where substr(var, 2, 1) is null
How can a subsrting from varchar string variable be null? In SQL Server this would never be true(?).
select var
from table
where substring(var, 2, 1) is null
In many cases in Oracle, the empty string is actually NULL.
If you substr() outside the range of your in-string, SQL server returns the empty string, while Oracle returns NULL (its equivalent to the empty string).