Because that behavior follows established ternary logic where NULL is considered an unknown value.
If you think of NULL as unknown, it becomes much more intuitive:
Is unknown a
equal to unknown b
? There’s no way to know, so: unknown
.
More Related Contents:
- Best way to check for “empty or null value”
- Determine Oracle null == null
- Why do NULL values come first when ordering DESC in a PostgreSQL query?
- Space used by nulls in database
- Sort by column ASC, but NULL values first?
- Not equal != operator on NULL
- Why does NULL = NULL evaluate to false in SQL server
- How to randomly select rows in SQL?
- What’s the difference between TRUNCATE and DELETE in SQL
- SQL best practice to deal with default sort order
- How can I get column names from a table in Oracle?
- single fixed table with multiple columns vs flexible abstract tables
- Primary key or Unique index?
- How to get a list of column names on Sqlite3 database?
- How to run a stored procedure in sql server every hour?
- Composite Primary key vs additional “ID” column?
- Questions every good Database/SQL developer should be able to answer [closed]
- Why do you create a View in a database?
- Logging ALL Queries on a SQL Server 2008 Express Database?
- How much disk-space is needed to store a NULL value using postgresql DB?
- Best database field type for a URL
- MySQL – how to front pad zip code with “0”?
- How can I implement SQL INTERSECT and MINUS operations in MS Access
- Postgres Error: More than one row returned by a subquery used as an expression
- Does ‘Select’ always order by primary key?
- How do I create and query linked database servers in SQL Server?
- Check if NULL exists in Postgres array
- SQL Inner Join On Null Values
- Temporal database design, with a twist (live vs draft rows)
- Executing SQL query on multiple databases