mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 22:12:21 +00:00
14 lines
315 B
SQL
14 lines
315 B
SQL
DROP TABLE IF EXISTS t;
|
|
|
|
CREATE TABLE t(a UInt32, b UInt32) ENGINE = MergeTree PARTITION BY a ORDER BY a;
|
|
|
|
INSERT INTO t SELECT number % 10, number FROM numbers(10000);
|
|
|
|
CREATE ROW POLICY OR REPLACE rp ON t FOR SELECT USING 0 TO ALL;
|
|
|
|
SELECT count(), min(a), max(a) FROM t;
|
|
|
|
DROP ROW POLICY rp ON t;
|
|
|
|
DROP TABLE t;
|