
# 删除Doris表
本章节介绍删除Doris表样例代码。
以下代码片段在"JDBCExample"类中。
以Java JDBC方式执行SQL语句删除集群中的*dbName.tableName*表。
```
String dropSql = "drop table " + dbName + "." + tableName;
```
```
public static void execDDL(Connection connection, String sql) throws Exception {
   try (PreparedStatement statement = connection.prepareStatement(sql)) {
      statement.execute();
   } catch (Exception e) {
      logger.error("Execute sql {} failed.", sql, e);
      throw new Exception(e);
   }
}
```
