Skip to Main Content
SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition
book

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition

by John L. Viescas, Michael J. Hernandez
September 2007
Intermediate to advanced content levelIntermediate to advanced
672 pages
13h 23m
English
Addison-Wesley Professional
Content preview from SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition

Nulls Revisited: A Cautionary Note

Now is as good a time as any to remind you about Nulls. You learned in Chapter 5 that a Null represents the absence of a value and that an expression processing a Null value will return a Null value. The same holds true for search conditions as well. A predicate that evaluates a Null value can never be true. This might seem confusing, but the predicate can never be false either! The SQL Standard defines the result of any predicate that evaluates a Null as unknown. Remember that a predicate must be true for a row to be selected, so a false or unknown result will reject the row.

To help clarify the matter, let’s reexamine in Figures 6-13 and 6-14 (page 194) the truth tables we first showed you in Figures 6-9 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL Queries for Mere Mortals®: A Hands-On Guide to Data Manipulation in SQL, Third Edition

SQL Queries for Mere Mortals®: A Hands-On Guide to Data Manipulation in SQL, Third Edition

John Viescas, Michael J. Hernandez
Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

Effective SQL: 61 Specific Ways to Write Better SQL, First Edition

John L. Viescas, Douglas J. Steele, Ben G. Clothier
SQL for Data Analytics

SQL for Data Analytics

Upom Malik, Matt Goldwasser, Benjamin Johnston

Publisher Resources

ISBN: 9780321444431Purchase book