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 do we get field detail of a table?

1022


How to change system global area (sga) in oracle?

959


What is oracle used for?

971


What are the varoius components of physical database structure of oracle database?

946


What are the database administrators utilities available?

972


How to start an oracle instance?

952


Describe the types of sub query?

938


Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

1047


Can select statements be used on views in oracle?

985


Explain the use of show option in imp command.

1048


How to use values from other tables in update statements using oracle?

1026


How does oracle handle read consistency?

1052


What are the data types in oracle?

981


What is where clause in oracle?

982


How to create a new tablespace in oracle?

934