Get the Keys for Rows Added by an INSERT Statement
This tip shows how to get the keys generated for the rows added by an INSERT statement. Statement st=null;PreparedStatement pst=null;Connection conn=null;ResultSet rs=null;ResultSetMetaData rsmd=null;…try { st= conn.createStatement(); }catch (SQLException e) {System.out.println(e.getMessage());}try