本帖最后由 kunlin888 于 2010-09-15 16:29:36 编辑

解决方案 »

  1.   

    --“我想在一页面中显示表一的记录(但如果表二中有了表一的记录就不显示,”
    select * from 表一
    where rowid not in (select distinct opptrowid from 表二 )“取只显示表三的记录”什么意思?表三是干嘛用的?
      

  2.   

    也可以left join之后查为null的那一行。
      

  3.   

    试试这个,应该没问题
    select * from table1 where rowid not in(select rowid from table1,table2 where table1.rowid=table2.Opptrowid )
      

  4.   

    按照你的说明 不就是取表一中不在表二的记录。。
    引用2楼的SQL语句:select * from 表一 where rowid not in (select distinct opptrowid from 表二 )
    是对的,如果错误 那只能是你所要表达的不是这个意思