sql 相关tips not in子查询 sel a.id from a where id not in (sel b.id from b ) 此处如果b中id含用null值,结果永远为null,修改应加上: sel a.id from a where id not in (sel b.id from b where id is not null)