更新时间:2024-04-29 GMT+08:00

创建库

功能介绍

通过on cluster语句在集群中创建clickhouse-example.properties中以databaseName参数值为数据库名的数据库。

样例代码

private void createDatabase(String databaseName, String clusterName) throws Exception  {
          String createDbSql = "create database if not exists " + databaseName + " on cluster " + clusterName;
          util.exeSql(createDbSql);
}