2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS test;
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE IF NOT EXISTS test( id UInt32, track UInt8, codec String, content String, rdate Date DEFAULT '2018-02-03', track_id String DEFAULT concat(concat(concat(toString(track), '-'), codec), content) ) ENGINE=MergeTree(rdate, (id, track_id), 8192);
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO test(id, track, codec) VALUES(1, 0, 'h264');
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM test ORDER BY id;
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO test(id, track, codec, content) VALUES(2, 0, 'h264', 'CONTENT');
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT * FROM test ORDER BY id;
|
2018-02-03 06:42:49 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS test;
|