In these two separate statements
Insert into Tablename1 values ( col1 , col2 );
and
merge into tablename1 a
USING tablename2 b
ON (condition)
WHEN NOT MATCHED THEN
Insert into (col1, col2 ) values (col1,col2);
the only thing that I feel differentiates the above two statements is the WHEN NOT MATCHED statement.
Does oracle internally perform any additional step when it encounters the WHEN NOT MATCHED to do an insert in the MERGE statement?
I mean to say, it does check if the record/s does exist in the table . so it must be doing an additional search in tablename1.
If not then both the statements does the same thing. ..
Please correct me if I am thinking wrong..
Regards,
Kaushik Nandy