mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
24 lines
920 B
Plaintext
24 lines
920 B
Plaintext
DROP TABLE IF EXISTS secure1;
|
|
DROP TABLE IF EXISTS secure2;
|
|
DROP TABLE IF EXISTS secure3;
|
|
|
|
CREATE TABLE secure1 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = MergeTree(date, (a, date), 8192);
|
|
CREATE TABLE secure2 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = Distributed(test_shard_localhost_secure, currentDatabase(), 'secure1');
|
|
CREATE TABLE secure3 ( date Date, a Int32, b Int32, c Int32, d Int32) ENGINE = Distributed(test_shard_localhost_secure, currentDatabase(), 'secure2');
|
|
|
|
INSERT INTO secure1 VALUES (1, 2, 3, 4, 5);
|
|
INSERT INTO secure1 VALUES (11,12,13,14,15);
|
|
INSERT INTO secure2 VALUES (21,22,23,24,25);
|
|
INSERT INTO secure3 VALUES (31,32,33,34,35);
|
|
|
|
SYSTEM FLUSH DISTRIBUTED secure2;
|
|
SYSTEM FLUSH DISTRIBUTED secure3;
|
|
|
|
SELECT * FROM secure1 ORDER BY a;
|
|
SELECT * FROM secure2 ORDER BY a;
|
|
SELECT * FROM secure3 ORDER BY a;
|
|
|
|
DROP TABLE secure1;
|
|
DROP TABLE secure2;
|
|
DROP TABLE secure3;
|