Oracle存在則更新,不存在則插入應用

更新同一張表的數據。須要注意下細節,由於可能涉及到using的數據集爲null,因此要使用count()函數。 [sql]  view plain  copy MERGE INTO mn a   USING (select count(*) co from mn where mn.ID=4) b   ON (b.co<>0)--這裏使用了count和<>,注意下,想下爲何!   WHEN MATC
相關文章
相關標籤/搜索