例子:查询物料表(tbl_material)中存在,配件主数据表(tbl_part_base_info)中不存在的配件编号:
select m.part_no from tbl_material m where not exists (select * from tbl_part_base_info base where m.part_no=base.part_no );
sql中not exists的用法
原文:http://www.cnblogs.com/chunyansong/p/5489962.html