JPA Criteria SELECT Clause
The SELECT clause is used to fetch the data from database. The data can be retrieved in the form of single expression or multiple expressions. In Criteria API, each form is expressed differently.
Criteria SELECT Example
Generally, select() method is used for the SELECT clause to fetch all type of forms. Here, we will perform several SELECT operations on student table. Let us assume the table contains the following records: -
Now, follow the below steps to perform operations: -
Selecting Single Expression
Here, we will fetch single column from database with the help of a simple example.
Selecting Multiple Expression
Here, we will fetch multiple columns from database with the help of a simple example.
Next TopicJPA ORDER BY Clause