d(rs.getString(¡°COLUMN_NAME¡±));
}
return columnNameList;
}
public static void main(String[] args) {
DBConnection dbConn = new DBConnection();
Connection conn = dbConn.getConnection();
try {
List
tableList = dbConn.getTableNameList(conn);
for (int i = 0; i < tableList.size(); i++) {
String tableName = tableList.get(i);
System.out.println("Table " + i + " : " + tableName);
List
columnList = dbConn.getColumnNameList(conn, tableName);
for (int j = 0; j < columnList.size(); j++) {
String coulumnName = columnList.get(j);
System.out.println(¡°Column ¡± + j + ¡± : ¡± + coulumnName);
}
System.out.println(¡°¡ª¡ª-¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª·Ö¸îÏß¡±);
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}
|