6.17.7 ORDER BY clause

With the ORDER BY clause, the objects and values are placed in order and then the query results are returned. An example of coding the ORDER BY clause is as follows:

SELECT e
FROM Employee AS e
ORDER BY e.monthlySalary DESC

A description of the ORDER BY clause is as follows:

For details on the syntax of the ORDER BY clause, see Appendix D BNF for JPQL.

Furthermore, the ORDER BY clause must satisfy the following conditions:

If these conditions are not satisfied, an exception might occur in Cosminexus JPA Provider. However, even if an exception does not occur, the operations might not function properly.