Help Center/ MapReduce Service/ Developer Guide (LTS)/ ClickHouse Development Guide (Normal Mode)/ Developing a ClickHouse Application/ Deleting a ClickHouse Table
Updated on 2026-04-09 GMT+08:00
Deleting a ClickHouse Table
This section describes how to delete a ClickHouse table.
Delete the replica table and distributed table created in Creating a ClickHouse Table.
The following sample code is for reference only:
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);
} Parent topic: Developing a ClickHouse Application
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot