如何使用 JQL 语言修复行的查询结果

How to fixe lines' s result of a query with JQL language

我想知道如何使用 JQL 语言修复行的查询结果,例如 SQL 中的 "LIMIT"?

使用 JPA,您不在查询字符串中指定它,而是在您从查询字符串创建的 Query 对象上指定,使用 setMaxResults:

TypedQuery<Student> query = em.createQuery("select s from Student s", Student.class);
query.setMaxResults(30);
List<Student> first30Students = query.getResultList();