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
IS it possible to built the oracle database without setting the kernal parameters?
Write a trigger example in oracle?
What happens in oracle commit?
How oracle handles dead locks?
List out the difference between commit, rollback, and savepoint?
ABOUT IDENTITY?
What is a read write transaction in oracle?
what is difference between sql plus and sql*plus? (not sql and sql plus).
How to use like conditions in oracle?
What is a snapshot in oracle database?
Explain the use of record option in exp command.
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
Explain the truncate in oracle?
What is an oracle user account?
What is a view and how is it different from a table?