mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 13:32:13 +00:00
20 lines
815 B
MySQL
20 lines
815 B
MySQL
|
set allow_experimental_low_cardinality_type = 1;
|
||
|
|
||
|
create table test.tab (a String, b LowCardinality(UInt32)) engine = MergeTree order by a;
|
||
|
insert into test.tab values ('a', 1);
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b UInt32;
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b LowCardinality(UInt32);
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b StringWithDictionary;
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b LowCardinality(UInt32);
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b String;
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
alter table test.tab modify column b LowCardinality(UInt32);
|
||
|
select *, toTypeName(b) from test.tab;
|
||
|
drop table if exists test.tab;
|
||
|
|