Null handling

    • NULL is not a value indicating a missing entry, but a placeholder for anything possible,
    • NULL = NULL evaluates to NULL, since one cannot know if one unknown is equal to another unknown,
    • NULL <> NULL evaluates to NULL, using same logic,
    • DISTINCT column may return multiple NULL values.
    • null == null evaluates to true,
    • null != null evaluates to false,
    • distinct column cannot contain multiple values.

    PRQL

    SQL

    1. SELECT
    2. FROM
    3. employees
    4. WHERE
    5. first_name IS NULL
    6. AND last_name IS NOT NULL