Null handling
NULL
is not a value indicating a missing entry, but a placeholder for anything possible,NULL = NULL
evaluates toNULL
, since one cannot know if one unknown is equal to another unknown,NULL <> NULL
evaluates toNULL
, using same logic,DISTINCT column
may return multipleNULL
values.
null == null
evaluates totrue
,null != null
evaluates tofalse
,- distinct column cannot contain multiple values.
PRQL
SQL
SELECT
FROM
employees
WHERE
first_name IS NULL
AND last_name IS NOT NULL