JPQL (Java Persistence Query Language)
JPQL (Java Persistence Query Language)
Question 1 options:
a) True
b) False
Answer: True
Question 2
Question 2 options:
a) True
b) False
Answer: True
Question 3
Binding parameters is used when a method needs dynamic values from the user
to create a query statement.
Question 3 options:
a) True
b) False
Answer: True
Question 4
Named queries use static query strings
Question 4 options:
a) True
b) False
Answer: True
Question 5
The following statement counts the number of customers whose age is above 50.
Question 5 options:
a) True
b) False
Answer: True
Question 6
Question 6 options:
a) True
b) False
Answer: False
Question 7
Question 7 options:
a) True
b) False
Answer: True
Question 8
Question 8 options:
a) True
b) False
Answer: True
Question 9
The syntax used to represent named parameters is the colon (:) symbol followed
by the name given to the parameter.
Question 9 options:
a) True
b) False
Answer: True
Question 10
Through JPA we are able to create records, read them, update, and delete. But all
these functionalities require the invocation of the primary key. Without the
primary key we can’t find a record, nor update it.
Question 10 options:
a) True
b) False
Answer: True
Question 11
The following statement deletes all customers whose age is above 50:
Question 11 options:
a) True
b) False
Answer: True
Question 12
Through JPQL we can create customized query statements without involving the
primary key.
Question 12 options:
a) True
b) False
Answer: True
Question 13
Positional parameters work with the position of a parameter in a query. The
syntax used to represent positional parameters is ? followed by a number.
Question 13 options:
a) True
b) False
Answer: True
Question 14
UPDATE Customer c
SET c.age = 10
WHERE c.name = ‘Jabu’
Question 14 options:
a) True
b) False
Answer: True
Question 15
Question 15 options:
a) True
b) False
Answer: True
Question 16
Question 16 options:
a) True
b) False
Answer: True
Question 17
The only difference between JPQL and SQL is that JPQL is object-oriented.
Question 17 options:
a) True
b) False
Answer: True..
Question 18
The following statement gets all the customers whose age is between 20 and 30,
both values inclusive.
Question 18 options:
a) True
b) False
Answer: True
Question 19
The following statement selects all the customers from the table called
Customer.
Question 19 options:
a) True
b) False
Answer: True
Question 20
Question 20 options:
a) True
b) False
Answer: True
Question 21
Question 21 options:
a) True
b) False
Answer: True..
Question 22
Dynamic queries;
Named queries;
Native queries; and
Criteria queries.
Question 22 options:
a) True
b) False
Answer: True