mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
14 lines
345 B
MySQL
14 lines
345 B
MySQL
|
DROP TABLE IF EXISTS mt;
|
||
|
CREATE TABLE mt (x String, y UInt64, INDEX idx (y) TYPE minmax GRANULARITY 1) ENGINE = MergeTree ORDER BY y;
|
||
|
INSERT INTO mt VALUES ('Hello, world', 1);
|
||
|
|
||
|
SELECT * FROM mt;
|
||
|
ALTER TABLE mt FREEZE;
|
||
|
SELECT * FROM mt;
|
||
|
|
||
|
SET mutations_sync = 1;
|
||
|
ALTER TABLE mt UPDATE x = 'Goodbye' WHERE y = 1;
|
||
|
SELECT * FROM mt;
|
||
|
|
||
|
DROP TABLE mt;
|