Table Has C1 And C2 Column If Exits any record in c1 then
Update c2 record Otherwise insert new record in the C1 And
C2 (Using Procedure)
Answer Posted / ron
use oracle's new feature called upsert :
merge t1
using (select * t1) t2
on (t1.col1=t2.col1)
when matched then
update set col2='value'
when not matched then
insert into (col1, col2) values ('val1', 'val2');
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to create tables for odbc connection testing?
How to estimate disk space needed for an export job?
What is oracle thin client?
What is meant by raw datatype?
How to write an inner join with the where clause in oracle?
Explain oracle insert into command?
What is logical backup in oracle?
How to retrieve the count of updated rows?
How to work with data objects interactively?
How to sort output in descending order in oracle?
What is the implicit cursor in oracle?
What is a trigger and what are its types in oracle?
Explain oracle instance.
What are the various oracle database objects?
What is truncate oracle?