1. 程式人生 > >ORACLE插入insert帶where條件

ORACLE插入insert帶where條件

開發十年,就只剩下這套架構體系了! >>>   

ORACLE插入帶條件

insert into THIRD_PAYEE_ACCOUNT_DETAIL t
  (id, collection_mode, t.store_code)
 select Third_Payee_Account_Detail_Seq.Nextval,'006','A05K' from dual   where not exists
  (select 1
     from THIRD_PAYEE_ACCOUNT_DETAIL td
    where td.collection_mode = '006'
      and store_code