mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
12 lines
349 B
MySQL
12 lines
349 B
MySQL
|
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;
|
||
|
|