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 / ramprasad.s

Hi Answer to Your question
IS
create or replace procedure samp(cname IN sample.ename%type,
cno IN sample.eno%type)
AS
ccount number;
begin
select count(*) INTO ccount from sample;
IF ccount = 0 then
update sample set ename = cname;
else
insert into sample values(cname, cno);
END IF;
END;


Sample Table is
ENAME ENO
100

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is connection pooling in oracle?

1011


What are the extensions used by oracle reports?

1083


What is the difference between alert log file and tarce file ?

2223


what is the scripts in data base?

2212


What is a table in oracle?

1018


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

1037


Is oracle a language?

985


How can we force the database to use the user specified rollback segment?

1194


How to pass parameters to procedures in oracle?

1077


What is the use of aggregate functions in oracle?

1071


How to connect asp pages to oracle servers?

1117


how to handle exceptions in post production

1479


What is the dynamic sql in oracle?

1120


Why is oracle so popular?

1049


How can Oracle users be audited?

1166