Connection connection = DBConnectionUtil.newConnection(driver, "jdbc:postgresql://"
+ ip + ":" + port + "/" + databaseName, username, password);//这里使用的是postgresql,可以根据自己需要换成Mysql或者Oracle
ResultSet resultSet=connection.getMetaData.getTables(null,null,tableName,null);
if (resultSet.next()) {//表已存在
}else{//表不存在
}



