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.
SQL
SQL Quiz
Start Quiz

or Read more about SQL Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback