title: How to use LIMIT 25 in @Query in Spring Data JPA
body: <p>I am trying to fetch 25 records from <code>employee</code> table but I am getting error (<code>java.lang.IllegalArgumentException</code>). And I want to sort it by <code>insertedTimeStamp</code> below is code</p>
  
  <pre><code>@Query("SELECT e FROM Employee e where e.name = :name AND e.address = :address order by e.insertedTimeStamp LIMIT 25")
  public List&lt;Employee&gt; findByNameAndAddress(@Param("name") String name, @Param("address") String address);
  </code></pre>