ClickHouse/tests/queries/0_stateless/01518_select_in_null.sql

91 lines
7.1 KiB
MySQL
Raw Normal View History

2020-10-16 22:07:16 +00:00
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (`cA` String, `c1` String) ENGINE = MergeTree ORDER BY (cA, c1);
insert into t1 select 'AAAAAAAAAAA', 'BBBBBB';
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where c1 in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null);
DROP TABLE t1;