############################################################################
1 连接 clickhouse 数据库
clickhouse-client --host=<host> --port=<port> --user=<user> --password=<password>;
clickhouse-client --host=192.168.111.131 --port=8123 --user=root --password=123456;
2 清空表中数据
方法一:truncate table 表名 ;
方法二:alter table 表名 delete where id='11';
3 删除表
DROP TABLE [IF EXISTS] table_name [, table_name2, ...];
DROP TABLE IF EXISTS table1, table2;
4 数据导出
登录上数据库后执行语句:
clickhouse-client --host=192.168.111.131 --port=8123 --user=root --password=123456;
SELECT * FROM 表名 INTO OUTFILE '1111.log';
############################################################################