change
This commit is contained in:
parent
10b1d91070
commit
34a8cbb4cc
|
@ -35,6 +35,23 @@ public class StatementTest {
|
|||
statement.executeUpdate("drop database if exists " + dbName);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCase() {
|
||||
try {
|
||||
ResultSet rs = statement.executeQuery("show databases");
|
||||
ResultSetMetaData metaData = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
for (int i = 1; i <= metaData.getColumnCount(); i++) {
|
||||
System.out.print(metaData.getColumnLabel(i) + ":" + rs.getString(i) + "\t");
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createTableAndQuery() throws SQLException {
|
||||
long ts = System.currentTimeMillis();
|
||||
|
|
Loading…
Reference in New Issue