create table temp017 as select * from xrmbat016 where not exists (select 1 from xrmbatm200512 where dcfeemobile=dcusermobile) andddregistertime<to_date('20051201','yyyymmdd')

解决方案 »

  1.   

    创建表结构同xrmbat016的表temp017,表中数据为以下查询的结果集:select 
        * 
    from 
        xrmbat016 
    where 
        not exists (select 1 from xrmbatm200512 where dcfeemobile=dcusermobile) 
        and
        ddregistertime<to_date('20051201','yyyymmdd')
      

  2.   

    我是想问where 以后的语句的具体意思....
      

  3.   

    查询xrmbatm200512表中dcfeemobile和dcusermobile的字段值不相等,并且ddregistertime早于2005-12-01的纪录
      

  4.   

    樓上幾位的解釋都有問題,它的正確意義是:
    查詢xrmbat016表中滿足ddregistertime<to_date('20051201','yyyymmdd')條件的記錄,並且如果在xrmbatm200512 表中存在任何一條記錄的dcfeemobile=dcusermobile,那麼就不從xrmbat016返回任何記錄,或者這樣說,如果在xrmbatm200512表中存在任何一條dcfeemobile=dcusermobile的記錄,那麼就不從xrmbat016表返回任何記錄,如果在xrmbatm200512表中不存在任何dcfeemobile=dcusermobile的記錄,那麼就再檢查xrmbat016表的ddregistertime<to_date('20051201','yyyymmdd')條件是否符合,如果符合,則返回符合此條件的所有記錄。