Let's EMP at an example EMP table in this link.
In particular, this request is
SELECT e1.empno, e1.sal FROM emp e1 WHERE e1.sal > ANY (SELECT e2.sal FROM emp e2 WHERE e2.deptno = 20);
In the case of ANY question, you ask the question: "Is my salary greater than anyone in department 20 (at least 1 person)." This means that you hope that at least one person has a lower salary than you. When there are no rows, this returns FALSE , because there is no one whose salary is less than you, you hoped for at least one.
In the case of EVERYTHING, the obvious question you ask is, "Is my salary the most?" To paraphrase this as "Does anyone have a bigger salary than me?" When there are no returned rows, your answer is TRUE , because "there is no one whose salary is higher than me.
source share