For the following table Women:
+-----+-----------+-------+
|  Id | FirstName | Score |
+-----+-----------+-------+
|   1 | Gwyneth   | 1000  |
|   3 | Jennifer  |  800  |
|   4 | Paris     | NULL  |
|   5 | Misha     | 3000  |
+-----+-----------+-------+
How many records will the following query return?

SELECT FirstName, Score FROM Women
WHERE Score >= ANY (SELECT Score FROM Women
                    WHERE FirstName='Megan');
Explanation
Whenever subquery is unable to return records, ANY operator automatically evaluates to False.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты