clickhouse可使用clickhouse client命令执行SQL,以select now();为例
可以在命令行中写好SQL
clickhouse client --host xxx --port xxx --database xx -q 'select now();'
也可以将SQL写入文件后执行文件中的SQL
clickhouse client --host xxx --port xxx --database xx --queries-file filie1 [file2 file3...]
多个SQL文件以空格隔开