Skip to content

ANY

SELECT employee_name
FROM employee
WHERE employee_salary > ANY
(SELECT employee_salary
FROM employee
WHERE department_id = 3);
Mike
John
Doe

The SQL ANY operator is used to compare a value to any applicable value in the list. In the provided query, the ANY operator is used in a subquery to fetch any employee names from the employee table where employee_salary is greater than the salary of any employee in the department_id = 3. The output is the list of employees who satisfy this condition.