mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
12 lines
349 B
SQL
12 lines
349 B
SQL
set allow_experimental_variant_type=1;
|
|
|
|
create table test (v Variant(String, UInt64)) engine=Memory;
|
|
insert into test values (42), ('Hello'), (NULL);
|
|
|
|
select * from test where v = 'Hello';
|
|
select * from test where v = 42; -- {serverError ILLEGAL_TYPE_OF_ARGUMENT}
|
|
select * from test where v = 42::UInt64::Variant(String, UInt64);
|
|
|
|
drop table test;
|
|
|