Q. How can I input multi-line SQL code? can you guys give me an example?

A. Just run clickhouse-client with -m switch, and it starts executing only after you finish the line with a semicolon.

Q. How can i use pager with clickhouse-client

A. Here is an example: clickhouse-client --pager 'less -RS'

Q. Data is returned in chunks / several tables.

A. Data get streamed from the server in blocks, every block is formatted individually when the default PrettyCompact format is used. You can use PrettyCompactMonoBlock format instead, using one of the options:

Q. Сustomize client config

A. you can change it globally (for all users of the workstation)

nano /etc/clickhouse-client/conf.d/user.xml

See also

or for particular users - by adjusting one of.


Also, it’s possible to have several client config files and pass one of them to clickhouse-client command explicitly