db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From larsk <lar...@yahoo.se>
Subject Get auto increment value
Date Tue, 12 Feb 2008 21:41:47 GMT

I am making a java-application that uses an apache derby database. One of the
fields in one of the tables has auto increment applied (GENERATED BY DEFAULT
AS IDENTITY). Is it possible to get the value that this field is going to
get or what value it got when making an insert? Or do I have to make a
select to the database to know this?
I use the following code to insert data to the database:


Connection con = DriverManager.getConnection(connectionString);

Statement state = con.createStatement();


catch (Exception ex)



If anyone has any idea on how to make this know I would appreciate any help.
View this message in context: http://www.nabble.com/Get-auto-increment-value-tp15443701p15443701.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message