I installed the clickhouse program in the ubuntu operating system and connected the SQLyog program. I can create a database, but I cannot create a table in it. It gives the following CODE:119 error.
ubuntu 🙂 create table taxonomy_object_firewalls
CREATE TABLE taxonomy_object_firewalls
Query id: 37520dd5-44b9-436f-a5b6-96002f0a4ce7
0 rows in set. Elapsed: 0.001 sec.
Received exception from server (version 22.2.2):
Code: 119. DB::Exception: Received from localhost:9000. DB::Exception: Table engine is not specified in CREATE query. (ENGINE_REQUIRED)
2
Answers
Check out the "Getting Started" guide in the docs. ClickHouse is unique in that every table has an
Engine
. Table engines determine where and how the data is stored. When in doubt, useMergeTree
:Also, make sure you read about the primary key and how it works in ClickHouse. Primary keys are not typically unique, but instead determine the sort order.
Noting that Rich’s syntax had a small unnecessary () after the ENGINE definition but was still successfully created in my testing. This syntax would be more accurate to the documentation: