nerdexam
Oracle

1Z0-860 · Question #77

A developer wants to create a Java Persistence query that restricts the results of an age-based query. Specifically, the developer wants to select everyone who is NOT a teenager. (A teenager is…

The correct answer is D. WHERE p.age NOT BETWEEN 13 and 19. See the full explanation below for the reasoning.

Question

A developer wants to create a Java Persistence query that restricts the results of an age-based query. Specifically, the developer wants to select everyone who is NOT a teenager. (A teenager is someone who is 13,14,15,16,17,18, or 19 years old.) Which expression in the query's WHERE clause is correct?

Options

  • AWHERE p.age NOTBETWEEN12 and 20
  • BWHERE p.age NOTBETWEEN 13 and 20
  • CWHERE p.age NOT BETWEEN12 and 19
  • DWHERE p.age NOT BETWEEN 13 and 19

How the community answered

(58 responses)
  • A
    14% (8)
  • B
    3% (2)
  • C
    10% (6)
  • D
    72% (42)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice