Search code examples
javasqlhibernatehql

Hql how to update a table with limit?


How can I limit the number of rows updated in hql. I know Query#setMaxResults() can be used for limiting records in select clause, but it is not working for update queries.


Solution

  • I have used named sql query to do the same. Since hibernate is not having support for limit clause in update query.