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
What is an oracle table?
What is bulk copy or bcp in oracle?
How to connect the oracle server as sysdba?
How many types of database triggers exist?
How to define an external table with a text file?
Can we use bind variables in oracle stored procedure?
How to pass a cursor variable to a procedure?
How to assign a table row to a record variable?
How to start a specific oracle instance?
Explain integrity constraint?
What is recovery manager(rman) backup in Oracle?
What is an oracle wallet?
Explain the dml?
What are the types of partitions in oracle?
State the various uses of dbcc command?