Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clickhouse CLI: Multi-statements are not allowed exception

I am trying to execute this query using the Clickhouse CLI:

INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def')

which I found here: https://clickhouse.com/docs/en/sql-reference/syntax

but it shows me the following error:

Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 17 (end of query) (line 1, col 17)

Could you please help me to fix that? I do not understand how to run queries like this using the CLI.

like image 981
White Cat Avatar asked Oct 26 '25 14:10

White Cat


1 Answers

Please try this in the CLI to allow the multi-statements:

clickhouse-client --multiline --multiquery
like image 182
Denis Kiryanov Avatar answered Oct 29 '25 19:10

Denis Kiryanov