Select * From dbconsumelist
Where IP not in (Select endid From dbfeeip)

解决方案 »

  1.   

    select * from dbconsumelist where ip not in 
       ( select beginip from dbfeeip) and ip not in 
       ( select endip from dbfeeip)
      

  2.   

    select * from dbconsumelist a where not exists ( select beginip from dbfeeip where a.ip >= beginip and a.ip <= endip )
      

  3.   

    Select * From dbconsumelist
    Where not exists (Select * From dbfeeip
    where ip >=Beginip  and ip<= endip       )CoolSlob() :不是要抢你的分,你的回答有问题,查不出所要的,但思路是对的.楼主:如果我的回答达到你的要求,把分给CoolSlob,升级了也是一个喜事,呵呵.
      

  4.   

    哦,weixy() 已经回答了!!
      

  5.   

    哦,weixy() 已经回答了!!
      

  6.   

    哦,weixy() 已经回答了!!
      

  7.   

    select * from dbconsumelist a where not exists 
    ( select beginip from dbfeeip  where a.ip >= beginip and a.ip <= endip )order by beginid desc
     try !!!!
      

  8.   

    楼上,exists里面是不是应该写成select *……
    我没有试,不知道对不对,不过你的应该是唯一可能正确的。
      

  9.   

    weixy() 和  Yang_(扬帆破浪) 已经回答了
      

  10.   

    谢谢,问题解决了,前两天出差,所以现在才结贴
    weixy()
    Yang_(扬帆破浪) 
    leimin(leimin)
    的回答都是正确的这200分先给weixy()
    我在另外开贴给两位加分