Here is how I am doing it now:
Resultset rs = statement.executeQuery("select max(id) from TableMain");
rs.next();
int myMaxId = rs.getInt(1);
//my insert sql is here to insert into another table the value of the max id (myMaxId) ....




Posted 11 October 2007 - 06:18 PM
Resultset rs = statement.executeQuery("select max(id) from TableMain");
rs.next();
int myMaxId = rs.getInt(1);
//my insert sql is here to insert into another table the value of the max id (myMaxId) ....
Posted 11 October 2007 - 08:32 PM
kensington, on 11 Oct, 2007 - 09:18 PM, said:
Resultset rs = statement.executeQuery("select max(id) from TableMain");
rs.next();
int myMaxId = rs.getInt(1);
//my insert sql is here to insert into another table the value of the max id (myMaxId) ....
