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 / senthilkumar
create or replace procedure update is
declare
cursor updt is
select cl from table;
num number(4);
begin
open updt;
fetch updt into num;
if num != NULL
then
update table set c2 = num or(desired data);
else
insert into table values(value,value);
exception
when others then
DBMS_OUTPUT.PUT_LINE('SQLERR'|| ''||SQLERRM);
end;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to start your 10g xe server?
What is an oracle table?
Is it possible to split the print reviewer into more than one region ?
What privilege is needed for a user to create views in oracle?
Can we protect our pl/sql source code?
What is connection pooling in oracle?
What is open database communication (odbc) in oracle?
What is the difference between $oracle_base and $oracle_home?
What is an index associated with a constraint?
What is not equal to in oracle?
What is save point in oracle database?
How to load excel data sheet to oracle database
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?
Explain what are the uses of rollback segment?
Explain oracle insert into command?