Clickhouse 入门基础操作

 

创建库:

:) CREATE DATABASE db_name;

删除库:

:) DROP DATABASE db_name;

删除表:

:) DROP TABLE table_name;

从MySQL导入数据到clickhouse:

:) CREATE TABLE IF NOT EXISTS clickhouse_db_name.clickhouse_table_name ENGINE=Log AS SELECT * FROM mysql('host:port', 'db', 'mysql_table_name', 'user', 'password')

查看表结构:

:) DESC TABLE table_name;

 

参考资料:

https://anjia0532.github.io/2019/07/17/mysql-to-clickhouse/

 

你可能感兴趣的:(clickhouse)