ClickHouse Create Table Guide
In ClickHouse, tables can be created using SQL statements. Here is a simple example:
CREATE TABLE my_table (
id UInt32,
name String,
age UInt8
) ENGINE = MergeTree()
ORDER BY id;
The above SQL query creates a table called my_table with three columns: id, name, and age, with data types UInt32, String, and UInt8 respectively. The table is using the MergeTree() storage engine and is sorted by the id column.
In addition to defining basic fields and storage engine settings, other properties such as partition keys, indexes, and data replicas can also be specified when creating a table. For specific syntax and parameters, please refer to the official documentation of ClickHouse.