yogesh nautiyal yogesh nautiyal - 10 months ago 147
SQL Question

Unexpected token limit in JPA

Whenever i'm using LIMIT in JPA query exceptionn is Thrown.can any one suggest me alternative way to filter the record on the basis of their rowNum or ronCount.

Select a from EmployeeBo where a.batchId=:'127'and LIMIT :startPonit,:endPoint,


You can't use LIMIT in JPA Named Query, but you can restrict records up to a row count by using setMaxResult();