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

What is the Tune Query

2341


What are a cluster and non-cluster index?

1063


Explain table?

1169


How to do a full database export?

1148


Can you create a synonym without having a table?

1087


How do we get field detail of a table?

1123


Can we write dml statement in function in oracle?

1121


Which is faster join or subquery in oracle?

1045


How to define a cusotmer as a supplier in ORACLE R12

2294


How to call a stored function in oracle?

1061


What is the quickest way to fetch the data from a table?

1099


How to set up autotrace for a user account?

1107


How many types of auditing in Oracle?

1085


Name the three major set of files on disk that compose a database in Oracle?

1170


Explain the use of owner option in exp command.

1094