github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/join/markjoin.test (about) 1 drop table if exists t1; 2 drop table if exists t2; 3 Create table t1(sid int, sname varchar(20), mid int); 4 Create table t2(mid int,mname varchar(20)); 5 insert into t1 values(1,'Seven',1),(2,'Ultraman',2),(3,'Gaia',NULL); 6 insert into t2 values(1,'James'),(3,'Tiga'); 7 select t1.sname from t1 where not exists (select t2.mname from t2 where t2.mid = t1.mid); 8 drop table if exists t1; 9 drop table if exists t2; 10 Create table t1(a int,b int,c int); 11 Create table t2(d int,e int,f int); 12 insert into t1 values(1,2,4),(3,4,7),(2,2,5),(5,2,3),(3,NULL,2),(NULL,2,1); 13 insert into t2 values(2,NULL,1),(3,3,4),(5,5,1),(NULL,NULL,7),(NULL,4,5); 14 select t1.c from t1 where a not in (select d from t2 where t1.b = e);