This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Which of the following statements are correct regarding Java Persistence Query Language (JPQL)?
1) A JPQL Query must contain a 'select' and a 'where' clause.
2) A JPQL query must contain a 'select', a 'where', and a 'from' clause.
3) A JPQL query must contain a 'select', and a 'from' clause.
4) JQPL queries are based on the database schema.
5) None of these.
the correct answer given is 5. Just for your information, in the previous version (EJB 2.0), the query language was called EJBQL and it only supported select queries. Now, in EJB 3.0, it is called JPQL and it supports all types of queries. The syntax of both is quite similar with minor differences. Some new built in functions have also been added. For the purpose of the exam, you don't have to worry about EJBQL. Just go through chapter 4 of EJB 3.0 Persistence specification. It is quite easy to understand.