Oracle
1Z0-860 · Question #108
A developer is working with an entity User, which has an identity field and a salary field. Which Java Persistence query will return those users with the highest salaries?
The correct answer is A. SELECT u FROM User u WHERE u.salary >= ALL (SELECT d.salary FROM User d). See the full explanation below for the reasoning.
Question
A developer is working with an entity User, which has an identity field and a salary field. Which Java Persistence query will return those users with the highest salaries?
Options
- ASELECT u FROM User u WHERE u.salary >= ALL (SELECT d.salary FROM User d)
- BSELECT u FROM User u WHERE u.salary >= ANY (SELECT d.salary FROM User d)
- CSELECT u FROM User u WHERE ALL(u.salary >= (SELECT d.salary FROM User d))
- DSELECT u FROM User u WHERE u.salary >= (SELECT ALL(d.salary) FROM User d)
How the community answered
(40 responses)- A80% (32)
- B13% (5)
- C3% (1)
- D5% (2)
Community Discussion
No community discussion yet for this question.