更新时间:2023-08-18 GMT+08:00
删除表
功能介绍
删除在创建表中创建的副本表和分布式表。
样例代码
private void dropTable(String databaseName, String tableName, String clusterName) throws Exception { String dropLocalTableSql = "drop table if exists " + databaseName + "." + tableName + " on cluster " + clusterName; String dropDisTableSql = "drop table if exists " + databaseName + "." + tableName + "_all" + " on cluster " + clusterName; ArrayList<String> sqlList = new ArrayList<String>(); sqlList.add(dropLocalTableSql); sqlList.add(dropDisTableSql); util.exeSql(sqlList); }
父主题: 样例代码说明