select a.* from a where a.id not in (select uid from b);

解决方案 »

  1.   

    select a.* from a where a.id not in (select uid from b);
    楼上的方法要支持子查询的才可以实现哦
      

  2.   

    mathematician(数学家) ( )
    select a.* from a where a.id not in (select uid from b);这样不行哟,这样还是把a表中的三条记录选择出来啦
      

  3.   

    select * from a where id not in(select uid from b)
      

  4.   

    各位我知道原因了,我的mysql 4.0不支持子查询,结帖