select a.* from a ,b where a.col=b.col and b.col is nullcol就是保存你所列数据的字段名。

解决方案 »

  1.   

    回CrazyFor(蚂蚁) 这样查询的结果为空啊 
    呵呵,不用嵌套只是因为数据库不支持:(可怜
      

  2.   

    TRY:select a.* from a left jon b on a.col=b.col  where b.col is null
      

  3.   

    many ways:
    select * from a 
    minus
    select * from b (It's Oracle Syntax:-)
      

  4.   

    select * from a where not exists (select * from b where b.col=a.col)
      

  5.   

    在其他低级数据库中:select * from a where col not in (select col from b)
      

  6.   

    最后这个好像foxpro2.5,Acess 2.0,interbase都支持呀
      

  7.   

    如果不支持嵌套查询,恐怕也未必支持 join ,嵌套查询在数据库引擎里面应该是转换成 join 查询的,至少 MS SQL Server 是这样。SQL Server 也不支持 minus 。不借助 Join 或者嵌套查询,可真想不出有什么办法
      

  8.   

    to CrazyFor(蚂蚁)
      果然是高手,呵呵,谢谢你的帮助,结果出来了。我用的是distinct,结果都不行,还是你高。
       另外也谢谢其他各位的帮忙,呵呵。
       解贴喽~~~~~~~~~~~