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
What is connection pooling in oracle?
What are the extensions used by oracle reports?
What is the difference between alert log file and tarce file ?
what is the scripts in data base?
What is a table in oracle?
What are the varoius components of physical database structure of oracle database?
Is oracle a language?
How can we force the database to use the user specified rollback segment?
How to pass parameters to procedures in oracle?
What is the use of aggregate functions in oracle?
How to connect asp pages to oracle servers?
how to handle exceptions in post production
What is the dynamic sql in oracle?
Why is oracle so popular?
How can Oracle users be audited?