Given the Actors table:
+-----------+------+
| Name      | Year |
+-----------+------+
| Nicolas   | 1980 | 
| Leonardo  | 1988 |
| Robert    | 1970 | 
| Adam      | NULL | 
+-----------+------+
How many records will the following query return?
SELECT * FROM Actors
WHERE Year IN (1970,1988,NULL);
Explanation
IS NULL or IS NOT NULL statements should be used to check for null / not null values.
All other types of comparisons (like =NULL, <>NULL, IN (NULL, ...)) are unreliable since they are evaluated to different results in different relational database management systems (False, UNKNOWN)

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести