mqsql插入数据时获得自增ID
?
Statement stmt = conn.createStatement();stmt.executeUpdate(sql);ResultSet rs = stmt.getGeneratedKeys();if(rs.next()){int n = rs.getInt(1);}