Files
oceanbase/test/mysql_test/test_suite/expr/t/expr_nseq.test
oceanbase-admin cea7de1475 init push
2021-05-31 22:56:52 +08:00

43 lines
1.2 KiB
Plaintext

--disable_query_log
set @@session.explicit_defaults_for_timestamp=off;
--enable_query_log
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
create table t1(a int, b int, c int, d int, primary key(a));
insert into t1 values(1,2,3,4);
insert into t1 values(2,null,3,4);
insert into t1 values(3,null,null,4);
insert into t1 values(4,2,null,null);
create table t2(a int, b int, c int, d int, primary key(a,b));
insert into t2 values(1,2,3,4);
insert into t2 values(2,2,3,4);
insert into t2 values(3,3,null,4);
insert into t2 values(4,2,null,null);
select 1<=>1;
select 1<=>null;
select null<=>1;
select null<=>null;
select 1.0<=>1.0;
select 1.0<=>null;
select null<=>1.0;
select 'abc'<=>null;
select 'abc'<=>'abc';
select 'null'<=>null;
select (1,2,3)<=>(1,2,3);
select (1,null, 3) <=> (1,null,3);
select (1,null,'abc')<=>(1,null,'abc');
select * from t1 where b<=>null;
select * from t1 where a<=>2;
select * from t1 where a<=>2 and b<=>null;
select * from t1 where b<=>null and c<=>null;
select * from t1 where b=null and c=null;
select * from t1 where b<=>null and c=null;
select * from t1 join t2 on t1.a=t2.a;
select * from t1 join t2 on t1.a=t2.a where t1.b<=>null and t2.b<=>null;
select * from t1 join t2 on t1.a<=>t2.a;