Merge pull request #5637 from nianhongdong/patch-1
Update JDBCDemo.java
This commit is contained in:
commit
ce72d94dc2
|
@ -68,12 +68,12 @@ public class JDBCDemo {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void insert() {
|
private void insert() {
|
||||||
final String sql = "insert into test.weather (ts, temperature, humidity) values(now, 20.5, 34)";
|
final String sql = "insert into " + dbName + "." + tbName + " (ts, temperature, humidity) values(now, 20.5, 34)";
|
||||||
exuete(sql);
|
exuete(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void select() {
|
private void select() {
|
||||||
final String sql = "select * from test.weather";
|
final String sql = "select * from "+ dbName + "." + tbName;
|
||||||
executeQuery(sql);
|
executeQuery(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue