DebugPreparedStatement.executeQuery SQLException occurred for sql: values nextval for schemaA.CUSTID_SEQ com.ibm.db2.jcc.a.nn: THE SQL STATEMENT IS NOT SUPPORTED. SQLCODE=-142, SQLSTATE=42612, DRIVER=3.52.99
I am using sequence to generate unique values but getting above error.
@SequenceGenerator(name="CUSTID_SEQ", sequenceName="CUSTID_SEQ") public class Customer implements Serializable{ @Id @Column(name = "custId") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CUSTID_SEQ") private Integer custId. } I tried using all possible DB2 dialects. Please provide solution so that I can use sequence and get next value.
|