2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS prewhere;
|
2015-04-02 03:29:42 +00:00
|
|
|
|
2022-06-23 08:37:52 +00:00
|
|
|
set allow_deprecated_syntax_for_merge_tree=1;
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE prewhere (d Date, a String, b String) ENGINE = MergeTree(d, d, 8192);
|
|
|
|
INSERT INTO prewhere VALUES ('2015-01-01', 'hello', 'world');
|
2015-04-02 03:29:42 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
ALTER TABLE prewhere ADD COLUMN a1 String AFTER a;
|
|
|
|
INSERT INTO prewhere VALUES ('2015-01-01', 'hello1', 'xxx', 'world1');
|
2015-04-02 03:29:42 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT d, a, a1, b FROM prewhere PREWHERE a LIKE 'hello%' ORDER BY a1;
|
2015-04-02 03:29:42 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE prewhere;
|