Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

>Solution :

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

clickhouse-client --multiline --multiquery
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading