有用的sql语句积累 ⑴. sql查询未被外键关联的数据 select * from bb b where not exists (select 1 from aa a where a.bid=b.bid)