mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-19 06:50:50 +00:00
13 lines
312 B
SQL
13 lines
312 B
SQL
DROP TABLE IF EXISTS tab;
|
|
|
|
CREATE TABLE tab (x UInt32, y UInt32) ENGINE = MergeTree() ORDER BY x;
|
|
|
|
INSERT INTO tab VALUES (1,1),(1,2),(1,3),(1,4),(1,5);
|
|
|
|
INSERT INTO tab VALUES (2,6),(2,7),(2,8),(2,9),(2,0);
|
|
|
|
SELECT * FROM tab ORDER BY x LIMIT 3;
|
|
SELECT * FROM tab ORDER BY x LIMIT 4;
|
|
|
|
DROP TABLE IF EXISTS tab;
|