Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How a tablespace is related to data files?

1109


How to create a table in a specific tablespace?

976


What is transport network substrate (tns) in oracle?

1047


How to convert dates to characters in oracle?

1042


How to delete a column in an existing table?

1076


What is an oracle recycle bin?

1009


What is the exact use of Collections?

2143


Does oracle database need java?

1011


What is connection pool in oracle?

988


WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?

2209


How to use "while" statements in oracle?

1327


How many types of synonyms in Oracle?

1124


How to select some rows from a table in oracle?

1078


What is a initialization parameter file in oracle?

1035


How can I see all tables in oracle?

1011