Is it true that the implementation of the comparison is different in these subd? For example, for oracle be fair:

create table test_ak ( f1 number); insert into test_ak values (1); insert into test_ak values (null); select count(*) from test_ak where f1 != 1; COUNT(*) -------- 0 

Is it fair for MS SQL server?

  • one
    For any SQL server, it is true that any comparison with NULL (except for null-safe compare, if there is one, or if the other behavior is specifically and explicitly specified by the settings) results in NULL, which is interpreted as FALSE. - Akina
  • 2
    There can be no difference. NULL behavior is specified by standards and surprisingly, all DBMS in this matter adhere to them. ru.wikipedia.org/wiki/NULL_(SQL) - Mike

1 answer 1

As for numbers, the implementation is identical. There are differences with string types - in MS SQL, an empty string and NULL in a string field are different values, i.e. if the condition is null is applied to a field with an empty string, such an entry will not be returned. Oracle also replaces the empty string value with NULL, so this record will be returned.