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 suggestions do you have to reduce the network traffic?

901


What is the minimum client footprint required to connect c# to an oracle database?

1019


How to connect to a remote server?

1054


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

1001


What is a trigger and what are its types in oracle?

1000


What is a dynamic performance view in oracle?

948


How to bring a tablespace offline?

1001


What is the parameter mode that can be passed to a procedure?

981


What is oracle host variable?

983


i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)

2261


How to convert a date to char in oracle? Give one example.

1003


How can we delete duplicate rows in a table?

929


Explain the use of compress option in exp command.

969


Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

1998


Explain the use of Merge statement in oracle 11g

978