Here are 2 columns of Elements table
+--------+------+
| Name   | Year |
+--------+------+
| Ru     | 1844 |
| Po     | 1898 |
| Ge     | 1885 |
| Fe     | NULL |
+--------+------+
How many records will the following query return?

SELECT * FROM Elements
WHERE Year IN (SELECT Year FROM Elements)
Explanation
NULL values should be compared using IS NULL and IS NOT NULL operators.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
SQL quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes