oracle 的常用sql


1. merge into 



  merge into t_comm_code C

  using(select #{info} as INFO, #{TMR} as tmr from dual) T

  on (C.INFO = T.INFO and C.TMR = T.TMR)

  when matched then 

    update set C.update_date = SYSdate
  when not matched then

    insert(id, tmr)

    values(SYS_GUID(), #{tmr})


2.