Week 2 - Nulls
Week 2 - Nulls
Week 2 – NULLs
Tim Welsh
• Data in SQL can be represented by a NULL
• NULLs can occur in any data type
Checks
-- the negation of an Unknown is still Unknown (and
won't be returned by WHERE clause)
This all probably seems silly now, but it has implications when
we start querying large tables with potentially many NULLs
• You should be able to answer the
following questions:
• What are the two “types of missing data”?
At this • How do NULLs propagate through basic operations
in SQL?
point… • What does it mean when we say SQL has a three
valued logic system?
• In SQL, what is the proper operator to check if a
value is NULL?
• How can I determine if some logical expression
evaluates to unknown?