create table t1(
id int primary key,
addre varchar(32)
);
create table t3(
id int primary key,
addre varchar(32)
);
insert into t1 values(1,'tyty'),(2,'opop'),(3,'pl');
insert into t3 values(2,'opop'),(3,'pl');
-- 左连接做差集,
-- 关联,如下;
t1----id------addre---t3----id------addre
1 tyty | null null
2 opop | 2 opop
3 pl | 3 pl
select a.* from t1 a left join t3 b
on a.id = b.id where b.id is null;