select * from a where a.id not exit (select b.id from b)

解决方案 »

  1.   

    先Thanks first !
    不过Mysql不支持子查询, 此法好象不行!
    请再指教!
      

  2.   

    把mysql升级到4.0
    select * from a where a.id not in (select b.id from b)
      

  3.   

    当遇到子查询是可以这样实现,具体为:
    select table.* from table left join table2 on table1.column1=table2.column2 where table2.column2 is null;
      

  4.   

    上个贴之写错了,抱歉。应该是这样:
    select table.* from table1 left join table2 on table1.column1=table2.column2 where table2.column2 is null;