第一种方案:
select
*
from
tb_a A
where
NOT
EXISTS (
select
1
from
tb_b B
where
A.ID = B.ID);
select * from swr_core.swr_exp a where NOT EXISTS (select 1 from shebei.de23_exp b where a.id = b.c_exp_id);
第二种方案:
select
*
from
tb_a A
where
A.ID
NOT
IN
(
select
B.ID
from
tb_b B );