I know that with resultSet we can do several things with a SELECT done in some table. For example: I know we can get a table and print its contents, listing which columns we want with methods like: getString and getInt.
Conection con = ........
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Clientes");
while(rs.next()) {
String nome = rs.getString("Nome");
System.out.println("Nome do Cliente: " + nome);
}
But if I want to simply show all the contents of any table I receive per parameter, those methods do not work. It would have to have something like:
System.out.println (rs.getAll());
That is, I want a method that takes the result of my SELECT * and shows on the screen, regardless of what columns or columns have in the table.
Exists in ResultSet this?