mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
12 lines
394 B
SQL
12 lines
394 B
SQL
DROP TABLE IF EXISTS prewhere;
|
|
|
|
CREATE TABLE prewhere (d Date, a String, b String) ENGINE = MergeTree(d, d, 8192);
|
|
INSERT INTO prewhere VALUES ('2015-01-01', 'hello', 'world');
|
|
|
|
ALTER TABLE prewhere ADD COLUMN a1 String AFTER a;
|
|
INSERT INTO prewhere VALUES ('2015-01-01', 'hello1', 'xxx', 'world1');
|
|
|
|
SELECT d, a, a1, b FROM prewhere PREWHERE a LIKE 'hello%' ORDER BY a1;
|
|
|
|
DROP TABLE prewhere;
|