题目写错了吗??
我的问题是:怎么写select 语句的where 条件,可以使返回结果集如下(只剩下上面的最后一条):oyphh    oypgg   nyphh     nypgg 
---------------------------------
001 1*2 NULL NULL <<======这里是 001 1*1 NULL NULL  吧???

解决方案 »

  1.   

    哦,是写错了,多谢神速,我怎么写,可以得到:
    oyphh        oypgg      nyphh          nypgg    
    ---------------------------------  
    001            1*1            NULL            NULL
      

  2.   

    select *,null nyphh,null nypgg  from old where not exists (select 1 from new where yphh=old.yphh and ypgg=old.ypgg)
      

  3.   

    多谢pengdali(大力),我散分100分给你,快接。(你帮了我好大的忙,当然感谢大虾),稍等。马上给分。