title: FETCH FIRST n ROWS ONLY within subquery using Java Persistence Query Language
body: <p>I'm trying to do a bulk update of DB2 table using Java Persistence Query Language:</p>
  
  <pre><code>UPDATE Account  a
  SET a.Status = 'r', a.Code = :code, a.Timestamp = CURRENT_TIMESTAMP
  WHERE ClientNumber IN  (SELECT ClientNumber FROM Account
                          WHERE a.Status = '' AND a.Type = :type 
                          ORDER BY a.Code ASC
                          FETCH FIRST 5 ROWS ONLY)
  </code></pre>
  
  <p>However, <strong>FETCH FIRST n ROWS ONLY</strong> appears not to be supported in JPQL.</p>
  
  <p>What are the other alternatives exist to do this?</p>