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
相关文章
相关标签/搜索