mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
14 lines
789 B
SQL
14 lines
789 B
SQL
|
|
DROP DATABASE IF EXISTS {CLICKHOUSE_DATABASE:Identifier};
|
|
set allow_deprecated_database_ordinary=1;
|
|
CREATE DATABASE {CLICKHOUSE_DATABASE:Identifier} ENGINE=Ordinary; -- Different inner table name with Atomic
|
|
|
|
set allow_deprecated_syntax_for_merge_tree=1;
|
|
create table {CLICKHOUSE_DATABASE:Identifier}.my_table ENGINE = MergeTree(day, (day), 8192) as select today() as day, 'mystring' as str;
|
|
show tables from {CLICKHOUSE_DATABASE:Identifier};
|
|
create materialized view {CLICKHOUSE_DATABASE:Identifier}.my_materialized_view ENGINE = MergeTree(day, (day), 8192) as select * from {CLICKHOUSE_DATABASE:Identifier}.my_table;
|
|
show tables from {CLICKHOUSE_DATABASE:Identifier};
|
|
select * from {CLICKHOUSE_DATABASE:Identifier}.my_materialized_view;
|
|
|
|
DROP DATABASE {CLICKHOUSE_DATABASE:Identifier};
|