QuestenaÜben und erkennen, was als Nächstes dran ist
Frage 3

In PostgreSQL 18, SELECT NULL IS DISTINCT FROM NULL, 1 IS DISTINCT FROM NULL; returns two values. Which pair is correct?

  1. false and NULL
  2. NULL and NULL
  3. false and trueRichtige Antwort
  4. true and true

Erklärung

IS DISTINCT FROM is a total comparison that never returns null: two nulls count as not distinct (false), and a null against a non-null counts as distinct (true). This is exactly the pair of cases that the plain <> operator answers with null.

Mit diesem Test weitermachen

Übung starten
Frage 3: In PostgreSQL 18, SELECT NULL IS DISTINCT FROM NULL, 1 IS… · SQL: NULL, Joins and Aggregates · Questena