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
Is there a combination of "like" and "in" in sql?
Does oracle partitioning improve performance?
how to clone 9i Database on to 10g Database.
Is there an oracle sql query that aggregates multiple rows into one row?
Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?
How to find out what oracle odbc drivers are installed?
How does Oracle guarantee data integrity of data changes?
What is raw datatype?
What are the types of trigger in oracle?
What is a system tablespace and when it is created?
In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?
Explain the use of online redo log files in oracle.
In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?
How to define an anonymous block?
What is the maximum number of triggers that can be applied to a single table?