Merge pull request #5637 from nianhongdong/patch-1

Update JDBCDemo.java
This commit is contained in:
Shengliang Guan 2021-04-01 15:12:43 +08:00 committed by GitHub
commit ce72d94dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }