Oracle
1Z0-898 · Question #25
1Z0-898 Question #25: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-898 to reveal the answer and full explanation for question #25. The question stem and answer options stay visible for context.
Question
A user entity is in a one-to-many relationship with a Book entity. In other words, a developer reach the collection of books that a user instance myUser has by using the path expression- "myuser - books". A developer wants to write a Java Persistence query that returns all users that have only two books. Which two are valid queries that return this information? (Choose two.)
Options
- ASELECT u FROM User U WHERE SIZE (u.books) = 2
- BSELECT u FROM User WHERE COUNT (u.books) = 2
- CSELECT u FROM User u (WHERE COUNT (b) FROM u.books b) = 2
- DSELECT u FROM user u WHERE (SELECT SIZE (b) FROM u.books b) = 2
Unlock 1Z0-898 to see the answer
You've previewed enough free 1Z0-898 questions. Unlock 1Z0-898 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.