Given two columns from Elements table
+--------+------+
| Name   | Year |
+--------+------+
| Au     | NULL |
| Be     | 1798 |
| Fr     | 1939 |
| Uus    | 2010 |
+--------+------+
how many records will the following query return?
SELECT * FROM Elements
WHERE Year NOT IN (SELECT Year FROM Elements)
Explanation
Inner sub-query will eliminate every possible record the outer query could have returned.
SQL
SQL Quiz
Start Quiz

or Read more about SQL Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback