ClickHouse/tests/queries/0_stateless/01710_projection_row_policy.sql
2022-08-11 19:20:44 +08:00

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;