DatabaseMetaData 中有得到表名和字段名的方法。 ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Retrieves a description of the tables available in the given catalog. ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Retrieves a description of table columns available in the specified catalog.
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
Retrieves a description of the tables available in the given catalog. ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
Retrieves a description of table columns available in the specified catalog.
一条记录一个map,map.put(columnName,columnValue);