2020-06-16 11:31:54 +00:00
|
|
|
DROP TABLE IF EXISTS add_table;
|
|
|
|
|
|
|
|
CREATE TABLE add_table
|
|
|
|
(
|
|
|
|
key UInt64,
|
|
|
|
value1 String
|
|
|
|
)
|
|
|
|
ENGINE = MergeTree()
|
|
|
|
ORDER BY key;
|
|
|
|
|
|
|
|
SHOW CREATE TABLE add_table;
|
|
|
|
|
|
|
|
ALTER TABLE add_table ADD COLUMN IF NOT EXISTS value1 UInt64;
|
|
|
|
|
|
|
|
SHOW CREATE TABLE add_table;
|
|
|
|
|
2020-06-16 11:36:39 +00:00
|
|
|
ALTER TABLE add_table ADD COLUMN IF NOT EXISTS key String, ADD COLUMN IF NOT EXISTS value1 UInt64;
|
|
|
|
|
|
|
|
SHOW CREATE TABLE add_table;
|
|
|
|
|
|
|
|
ALTER TABLE add_table ADD COLUMN IF NOT EXISTS value1 UInt64, ADD COLUMN IF NOT EXISTS value2 UInt64;
|
|
|
|
|
|
|
|
SHOW CREATE TABLE add_table;
|
|
|
|
|
2020-06-17 08:29:56 +00:00
|
|
|
ALTER TABLE add_table ADD COLUMN value3 UInt64, ADD COLUMN IF NOT EXISTS value3 UInt32; --{serverError 44}
|
|
|
|
|
2020-06-16 11:31:54 +00:00
|
|
|
DROP TABLE IF EXISTS add_table;
|