yogesh nautiyal yogesh nautiyal - 2 years ago 299
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,

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download