Help Center/ MapReduce Service/ Developer Guide (LTS)/ ClickHouse Development Guide (Normal Mode)/ Sample Code/ Creating a Database
Updated on 2022-11-18 GMT+08:00
Creating a Database
Run the on cluster statement to create a database whose name is the value of databaseName in Table 1 in the cluster.
private void createDatabase(String databaseName, String clusterName) throws Exception {
String createDbSql = "create database if not exists " + databaseName + " on cluster " + clusterName;
util.exeSql(createDbSql);
} Parent topic: Sample Code
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.
The system is busy. Please try again later.