tenho um campo autonumber e preciso quando faco o insert
recuperar o valor deste campo
[code]PreparedStatement stmt = conexao.prepareStatement("insert into tabela (nome) values(?)");
stmt.setString(1, "Jair");
stmt.executeUpdate();
ResultSet res = stmt.getGeneratedKeys();
res.first();
int id = res.getInt(1);[/code]