Know Your NULLs<br>Know Your NULLs<br>These questions were inspired by the talk WAT that makes fun of some Javascript and Ruby "features". I've been reading The Art of Postgresql and thought SQL NULLs deserved a similar treatment. Please enjoy this quiz that sheds some light on the best NULL semantics in SQL. All examples were run in Postgres. Other RDBMSs may differ slightly.
employees<br>+----+-------+------------+<br>| id | name | manager_id |<br>+----+-------+------------+<br>| 1 | Alice | NULL |<br>| 2 | Bob | 1 |<br>| 3 | Cara | 2 |<br>| 4 | Dana | NULL |<br>+----+-------+------------+SELECT id, name FROM employees WHERE manager_id != 1;
choose an answerA. Cara onlyB. Cara and DanaC. Bob and CaraD. Alice, Cara, and Dana<br>next question