nerdexam
Oracle

1Z0-898 · Question #24

Which statement is correct about the Java Persistence API support for the SQL queries?

The correct answer is C. Only SELECT SQL queries are required to be supported. The Java Persistence Query Language (JPQL) is a platform-independent object-oriented query language defined as part of the Java Persistence API (JPA) specification. In addition to retrieving objects (SELECT queries), JPQL supports set based UPDATE and Not B:EntityManager API…

JPQL

Question

Which statement is correct about the Java Persistence API support for the SQL queries?

Options

  • ASQL queries are NOT allowed to use parameters.
  • BThe result of an SQL query is not limited to entities.
  • COnly SELECT SQL queries are required to be supported.
  • DSQL queries are expected to be portable across databases.

How the community answered

(35 responses)
  • A
    14% (5)
  • B
    6% (2)
  • C
    77% (27)
  • D
    3% (1)

Explanation

The Java Persistence Query Language (JPQL) is a platform-independent object-oriented query language defined as part of the Java Persistence API (JPA) specification. In addition to retrieving objects (SELECT queries), JPQL supports set based UPDATE and Not B:EntityManager API offers methods for creating instances of Query for executing native SQL statements. The most important thing to understand about native SQL queries created with EntityManager methods is that they, like JPQL queries, return entity instances, rather than database table records.

Topics

#native SQL#SQL query support#SELECT queries#portability

Community Discussion

No community discussion yet for this question.

Full 1Z0-898 Practice