mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
14 lines
315 B
MySQL
14 lines
315 B
MySQL
|
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;
|