sql - insert if not exists

后端 未结 4 1745
别那么骄傲
别那么骄傲 2021-01-13 08:44

I am having trouble with a sql query. I need to insert a row if the same row does not exist already. This is what I have so far:

DECLARE
BEGIN
   FOR FOLDE         


        
4条回答
  •  旧巷少年郎
    2021-01-13 09:03

    A better (Oracle specific?) solution may be the MERGE statement.

    See here for a nice explanation, with examples:

    http://www.oracle-base.com/articles/10g/MergeEnhancements10g.php

    Hope that helps.

提交回复
热议问题