3

I'm new to Clickhouse but I recall SQL having select into capabilities.

SELECT column1, column2, column3, ...
INTO newtable 
FROM oldtable
WHERE condition;

What is the Clickhouse way to do that ?

Peter Moore
  • 1,632
  • 1
  • 17
  • 31

1 Answers1

5
create table xxx_new Engine=Log as select 1 a, 2 b

DESCRIBE TABLE xxx_new

┌─name─┬─type──┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ a    │ UInt8 │              │                    │         │                  │                │
│ b    │ UInt8 │              │                    │         │                  │                │
└──────┴───────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘
Denny Crane
  • 11,574
  • 2
  • 19
  • 30