Oracle MERGE does not INSERT Oracle MERGE does not INSERT oracle oracle

Oracle MERGE does not INSERT


Works for me:

SQL> create table mytable (id varchar(3), name varchar(30));Table created.SQL> MERGE INTO mytable  mt  2  USING dual  3  ON (mt.id = 'AAA' )    4  WHEN MATCHED THEN   5      UPDATE SET mt.name = 'updated'  6  WHEN NOT MATCHED THEN   7      INSERT (mt.id , mt.name )  8      VALUES ('AAA', 'Gooood' );1 row merged.SQL> select * from mytable;ID  NAME--- ------------------------------AAA Gooood