Java
POLITECHNIKA RZESZOWSKA - Wydział Elektrotechniki i Informatyki
Statement statement = connection.createStatementO;
String ąuery = "SELECT * FROM myDatabaseTable ORDER BY"
+ ” id";
ResultSet rs = statement.executeQuery(ąuery);
// process ąuery results results = new StringBuffer();
ResultSetMetaData metaData - rs.getMetaData();
int numberOfColumns = metaData.getColumnCount(); for (int i = 1; i <= numberOfColumns; i++) {
results.append(metaData.getColunmName(i) + "\t");
}
results.append("\n”);
U
JAVA Wykład 15