从jdbc的resultset中获得列名

ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
 ResultSetMetaData rsmd = rs.getMetaData();
 String name = rsmd.getColumnName(1);

你可能感兴趣的:(java,oracle,mysql)