Differences

This shows you the differences between two versions of the page.

Link to this comparison view

next_sequence_value [2015/11/11 17:05]
next_sequence_value [2021/04/05 11:23] (current)
Line 1: Line 1:
 +====== Generate Next Sequence Value with JPA ======
  
 +<sxh java>
 +Query query = em.createNativeQuery("SELECT NEXTVAL('schema.sequence_name')");
 +Long result = (Long) query.getSingleResult();
 +return result;
 +</sxh>
 +
 +{{tag>java}}