UPDATE  tablename SET  col1 = :col1value WHERE id.col2=:col2 Value 
ORDER BY col3 ASC LIMIT 2;
I need an alternative for the above query, as LIMIT keyword is not accepted in HQL. setMaxResults works only for select query.
Idea is, for the query to update all the records corresponding to col1value but one.(LIMIT value can be calculated and is available)