What i should do Derby to update system table values also, especially the SYS.SYSCOLUMNS.AUTOINCREMENTVALUE column?
I'm somewhat confused by your question, but I think you can use ALTER TABLE ALTER COLUMN RESTART WITH and ALTER TABLE ALTER COLUMN INCREMENT BY to adjust the auto-increment information to reflect the rows that have been inserted into the table. See: http://db.apache.org/derby/docs/10.4/ref/rrefsqlj81859.html thanks, bryan P.S. I think this discussion belongs on derby-user, not derby-dev
